"Which formats does LinkedIn accept?" sounds like it should have a one-line answer. It does not, because most platforms never write their formats down. This page lists what each platform's own documentation says about og:image formats — and, just as important, where it says nothing — so you can see why JPEG or PNG is the answer that never needs a second guess.
How this page was made. Every cell comes from the platform's own documentation, read on 2026-11-21 and linked in the table below it; X's card docs survive only in the Internet Archive. "Not documented" means the platform's link-preview docs name no formats, not that the format fails. We did not post test images on each platform; we did run one file of each format through the platform checks of our OG checker, which only apply limits a platform has published (results further down).
The matrix
✓ = listed by the platform · ✗ = documented as unsupported · — = not documented
| Platform | JPEG | PNG | WebP | GIF | AVIF | SVG |
|---|---|---|---|---|---|---|
| X (Twitter) | ✓ | ✓ | ✓ | ✓ first frame only | — | ✗ |
| Discord | ✓ | ✓ | ✓ | ✓ | ✓ | — |
| Mastodon | ✓ | ✓ | ✓ | ✓ | — | — |
| LinkedIn (link preview) | — | — | — | — | — | — |
| LinkedIn (ads, Images API uploads) | ✓ | ✓ | — | ✓ | — | — |
| Facebook, Messenger | ✓ | ✓ | — | ✓ | — | — |
| — | — | — | — | — | — | |
| Slack | — | — | — | — | — | — |
| Telegram | — | — | — | — | — | — |
| iMessage | — | — | — | — | — | — |
| Microsoft Teams | — | — | — | — | — | — |
Read the columns, not the rows: JPEG and PNG have no ✗ anywhere and are listed by every platform that lists anything. WebP is a ✓ in three rows and missing from Facebook's list. SVG is the one format with an explicit ✗.
What each platform says
- X: "JPG, PNG, WEBP and GIF formats are supported. Only the first frame of an animated GIF will be used. SVG is not supported." Images "must be less than 5MB in size" (X cards markup, archived).
- Discord: "Supported formats are .png, .gif, .jpg, .jpeg, .webp, and .avif." An
og:image:typetag, if present, "Must be a supported format" (Discord link previews). - Mastodon: preview card images are JPEG, PNG, GIF or WebP up to 8 MB, per the
PreviewCardmodel in Mastodon's source (v4.7.4). Each server fetches the card itself. How that fetch works, and why it leaves some posts without a card: Mastodon link preview not showing. - LinkedIn: the link-preview requirements give a 5 MB maximum, a 1200×627 minimum and a 1.91:1 ratio, and no formats (LinkedIn Help). The same page lists "File types: JPG, PNG, or GIF" for single image ads, and the Images API supports "JPG, GIF, and PNG formats" for uploaded images. So the honest answer to "which image formats does LinkedIn accept for a link preview" is: it does not say; the formats it lists anywhere are JPG, PNG and GIF. More on LinkedIn previews.
- Facebook: Meta's Images in link shares sets a 200×200 minimum, an 8 MB maximum and 1200×630 for the best display, without a format list. The formats appear in Meta's tag reference, under
og:image:type: "MIME type of the image. One ofimage/jpeg,image/giforimage/png". WebP, AVIF and SVG are not among them. - WhatsApp: under 600 KB, at least 300 px wide, 4:1 or narrower (WhatsApp link previews) — no formats. Curiously, the example tag on that page points at an
.svgfile; WhatsApp does not say SVG works, and we did not test it. - Slack: Slackbot fetches the image "to check validity and extract other metadata" (Slack robots) — no formats.
- iMessage: Apple's TN3156 asks for images at least 900 pixels wide and caps associated resources at 10 MB — no formats.
- Telegram, Microsoft Teams: no published format list for link previews.
What our checker reports for each format
We made one 1200×630 file of each format with ImageMagick and ran it through our checker's platform checks on 2026-11-21:
| File | X | Discord | Facebook, LinkedIn, WhatsApp, iMessage |
|---|---|---|---|
| JPEG, 16 KB | ok | ok | ok |
| WebP, 5 KB | ok | ok | ok |
| GIF, 150 KB | ok | ok | ok |
| AVIF, 0.5 KB | format AVIF, X takes JPG, PNG, WebP, GIF | ok | ok |
| SVG | format SVG, X takes JPG, PNG, WebP, GIF | format SVG, Discord takes PNG, GIF, JPG, WebP, AVIF | ok |
The last column is "ok" because our checker only applies the format lists recorded in our size reference, and it never invents a limit. LinkedIn, WhatsApp and iMessage publish no list. Facebook's og:image:type list (JPEG, GIF, PNG) is not in the checker yet, so for Facebook a WebP, AVIF or SVG image is wrongly marked "ok". An "ok" in that column means "no recorded rule broken", not "tested on the platform".
The server has to say what the file is
A format is only as good as the response that carries it. Check the image URL as a crawler would:
curl -sIL -A "facebookexternalhit/1.1" https://example.com/og/post.jpg | grep -i '^content-type'
You want image/jpeg or image/png. A missing file served as a 200 HTML page, application/octet-stream, or an image converted to WebP or AVIF by a CDN that reads the Accept header are all ways a correct-looking og:image becomes something else for the crawler. If your CDN converts images, exclude the social image path from it.
opengraph-image.png and public/og.jpg
Two file names people search for:
opengraph-image.pngis a Next.js file convention. Put anopengraph-imagefile in an app route folder and "Next.js will evaluate the file and automatically add the appropriate tags to your app's<head>element"; the supported types are.jpg,.jpeg,.pngand.gif, and the build fails if the file is over 8 MB (5 MB fortwitter-image) (Next.js docs). Note that GIF list: Next.js accepts nothing that X, Discord or Mastodon would reject.public/og.jpgis a file in a framework'spublicfolder, which Next.js serves "starting from the base URL (/)" (Next.js docs); Vite, Astro and others do the same. The file is at/og.jpg, but the tag must hold the full address:<meta property="og:image" content="https://example.com/og.jpg">. A relative/og.jpgis the classic reason an og:image does not show.
Animated images
GIF is listed by X, Discord, Mastodon and LinkedIn's upload specs, but X uses only the first frame, and the platforms that do not list formats say nothing about animation. Where a moving preview actually plays is a separate question, covered in animated OG images: GIF and MP4.
Recommendation
Use JPEG for anything photographic or with gradients, PNG for flat graphics and text on solid colour, at 1200×630 and under 600 KB, and serve it with the matching Content-Type. That one file meets every published rule: Facebook's 8 MB and its JPEG, GIF, PNG list, LinkedIn's 5 MB and 1200×627, X's 5 MB and format list, WhatsApp's 600 KB, iMessage's 900 px. The size of every platform's preview is on the OG image size page.
Shareglint renders social images from HTML templates as JPEG or PNG at 1200×630 — the social images of our own guide pages weighed 36–64 KB on 2026-11-21 — served with the right content type from an absolute HTTPS URL. The free plan covers 100 images a month.