Anthony Scaramucci has been blocked from tweeting — because of his “fat-shaming” of President Trump, the former White House communications director said Friday.

Scaramucci sent the website Axios a screenshot of the notification he got from Twitter at 8:55 a.m. that says, “Your account has been locked.

“We have determined that you have violated the Twitter Rules, so you’ll need to wait some time before using Twitter again.

“You will be able to unlock your account in: 7 hours and 40 minutes. Note: you may need to complete some additional tasks to resume using Twitter.”

The onetime Trump mouthpiece-turned-critic told Axios, “I think it is related to ‘fat-shaming’ President Trump.”

Scaramucci was referring to his tweeted response to Trump making fun of a protester in New Hampshire on Thursday, when the president told a crowd of supporters, “That guy’s got a serious weight problem. Go home, start exercising.”

Scaramucci tweeted of Trump, “Said the fattest President since William Howard Taft …” It was his last tweet before his account was locked.

The former White House aide told Axios, “I should have said [Trump] is the largest proportioned President since William Howard Taft. My bad.”

Twitter confirmed the lockout in an email to The Post.

“The account is suspended, not locked,” a rep said. “The user is temporarily locked out of their account for violating our abusive behavior policy.

“If a Tweet was found to be in violation of our rules, and has yet to be deleted by the person who Tweeted it, we will hide it behind a notice. The account will remain locked until the Tweet is removed.”