Skip to content
Shaflex

Mastodon image sizes

Mastodon's image limits come from its own code, and every server can change them. Here are the defaults, how posts with several images are cropped, and a resizer set up for Mastodon.

Runs in your browser. Your text and images never leave it.

Updated

Network

Where it goes

  • Up to 16 MB
  • JPEG, PNG, GIF, WebP
  • We make up to 8.3 megapixels

Drop an image here

or

JPEG, PNG, WebP or GIF. It stays on your device. Nothing's uploaded.

Your image

Your resized image shows up here.

Shape

Shown at its own shape, never cropped. A very tall one shows narrower.

Save as

0 / 10,000

Describe the image for people who can't see it. Copy it into the post with the image.

Mastodon image sizes at a glance

Every Mastodon server sets its own limits and may run an older version. These are Mastodon's defaults, and what mastodon.social reports; your server's /api/v2/instance has its own.

Mastodon image sizes by placement
PlacementWe makeShapeFile sizeFormats
Post imageup to 8.3 megapixelsIts own shape16 MBJPEG, PNG, GIF, WebP
Several imagesup to 8.3 megapixels3:4 or 3:216 MBJPEG, PNG, GIF, WebP
Profile picture400 × 4001:18 MBJPEG, PNG, GIF, WebP
Header1500 × 5003:18 MBJPEG, PNG, GIF, WebP
Link preview image663 × 3471.91:1 or 1:18 MBJPEG, PNG, GIF, WebP

Your server sets the limits

Mastodon isn't one site. Each server runs its own copy, can change these limits, and may run an older version. The numbers on this page are Mastodon's defaults and what mastodon.social reports.

To check your own server, open https://your.server/api/v2/instance in a browser and look under configuration, then media_attachments. It lists the image size limit and the largest image in pixels that your server takes.

Images in a post

Each image can be up to 16 MB, which in Mastodon's code means 16,777,216 bytes. JPEG, PNG, GIF and WebP all work; HEIC, HEIF and AVIF are switched off for now.

Mastodon scales anything over 8,294,400 pixels (3840 × 2160) down to that many, and refuses images over 33,177,600 pixels (7680 × 4320). So the resizer stops at 8.3 megapixels: anything more is thrown away on arrival.

A single image is never cropped. It shows at its own shape, and a very tall one just shows narrower. A GIF is turned into a video so it keeps moving, as long as it's no bigger than 921,600 pixels (1280 × 720).

Alt text, which Mastodon calls a description, can run to 10,000 characters. Mastodon counts code points, so most emoji count as one.

Two to four images

A post takes up to 4 images. Two or more share a 3:2 box, and each image is cropped to its part of it. Mastodon centres each crop on the image's focal point, which you can set when you post. The resizer's focal point does the same job before you upload, so the crop is the one you chose.

How Mastodon lays out several images
LayoutShapeWhat you see
Two images3:4Two halves of a 3:2 box, each cropped to 3:4.
Three images: the first3:4The left half of a 3:2 box, cropped to 3:4.
Three images: the second or third3:2Quarters on the right of the box, each cropped to 3:2.
Four images3:2A grid of two by two, each cropped to 3:2.

Profile and link previews

Profile picture and header

The profile picture can be up to 8 MB; Mastodon crops it square and stores it at 400 × 400. The header can be up to 8 MB too, at 1500 × 500; a bigger one is scaled down to that many pixels. Both take a description of up to 150 characters for screen readers.

Link previews

A link preview comes from the page's own preview image. Your server fetches it; you don't upload it. Wide images get a large card at 1.91:1, and anything else shows as a small square beside the title. Servers keep card images at up to 230,400 pixels (640 × 360), so 663 × 347 is the largest 1.91:1 image that's kept whole.

Why we make these sizes

  • Post image and Several images. Mastodon scales images down to 8,294,400 pixels (3840 × 2160), so a bigger file gains nothing.
  • Profile picture. Mastodon stores profile pictures at 400 × 400.
  • Header. Mastodon's header size is 1500 × 500.
  • Link preview image. Mastodon keeps card images at up to 230,400 pixels and shows wide ones at 1.91:1; 663 × 347 is the largest that fits both.

Does Shaflex check my images for Mastodon?

Yes. Shaflex checks every image you attach against Mastodon's media rules, and when it posts it shrinks a still image to fit your server's file cap. You can mark media as sensitive on any server. The image editor works inside your draft: crop to a network's size, put a screenshot in a device or on a backdrop, and blur what's private.

Questions

What's the image size limit on Mastodon?

16 MB per image by default, which in Mastodon's code is 16,777,216 bytes. Each server can set its own; mastodon.social reports the default.

Does Mastodon crop images?

Not a single image: it shows at its own shape. With two to four images, each one is cropped to fit its part of a 3:2 box, centred on the focal point you set.

What size is a Mastodon header?

1500 × 500. A bigger one is scaled down to that many pixels, and the file can be up to 8 MB.

How long can alt text be on Mastodon?

Up to 10,000 characters by default. Mastodon calls it a description.

Why does my server allow something different?

Every Mastodon server runs its own copy and can change these limits. Your server's /api/v2/instance page lists the ones it uses.

Write the next post once.

Shaflex fits it to Threads, X, Bluesky, Mastodon and LinkedIn, schedules it on your rhythm and brings the replies back to you.

Free plan, no card needed.