# og:image formats: which platforms take JPEG, PNG, WebP, GIF, AVIF and SVG

**In short:** JPEG and PNG are the only og:image formats safe everywhere: no platform rules them out, and Facebook, X, Discord, Mastodon and LinkedIn's upload specs list both. WebP is documented by X, Discord and Mastodon only; AVIF only by Discord. X says SVG is not supported, and no platform lists it. WhatsApp, Slack, Telegram and iMessage name no formats.

> Which image formats Facebook, LinkedIn, X, WhatsApp, Slack, Discord, Telegram, iMessage and Mastodon accept for og:image, from each platform's own docs.

Published 2026-11-21 · https://shareglint.com/en/guides/og-image-formats

"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](https://shareglint.com/en/tools/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 | ✓ | ✓ | — | ✓ | — | — |
| WhatsApp | — | — | — | — | — | — |
| 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](https://web.archive.org/web/20250101200326/https://developer.x.com/en/docs/x-for-websites/cards/overview/markup)).
- **Discord:** "Supported formats are .png, .gif, .jpg, .jpeg, .webp, and .avif." An `og:image:type` tag, if present, "Must be a supported format" ([Discord link previews](https://docs.discord.com/developers/link-previews/overview)).
- **Mastodon:** preview card images are JPEG, PNG, GIF or WebP up to 8 MB, per the `PreviewCard` model in Mastodon's source ([v4.7.4](https://github.com/mastodon/mastodon/blob/v4.7.4/app/models/preview_card.rb)). Each server fetches the card itself. How that fetch works, and why it leaves some posts without a card: [Mastodon link preview not showing](https://shareglint.com/en/guides/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](https://www.linkedin.com/help/linkedin/answer/a521928)). The same page lists "File types: JPG, PNG, or GIF" for single image ads, and the [Images API](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/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](https://shareglint.com/en/guides/linkedin-post-image-not-showing).
- **Facebook:** Meta's [Images in link shares](https://developers.facebook.com/docs/sharing/webmasters/images) 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](https://developers.facebook.com/documentation/sharing/webmasters), under `og:image:type`: "MIME type of the image. One of `image/jpeg`, `image/gif` or `image/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](https://developers.facebook.com/documentation/business-messaging/whatsapp/link-previews/)) — no formats. Curiously, the example tag on that page points at an `.svg` file; 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](https://api.slack.com/robots)) — no formats.
- **iMessage:** Apple's [TN3156](https://developer.apple.com/documentation/technotes/tn3156-create-rich-previews-for-messages) 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:

```bash
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.png`** is a Next.js file convention. Put an `opengraph-image` file 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`, `.png` and `.gif`, and the build fails if the file is over 8 MB (5 MB for `twitter-image`) ([Next.js docs](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image)). Note that GIF list: Next.js accepts nothing that X, Discord or Mastodon would reject.
- **`public/og.jpg`** is a file in a framework's `public` folder, which Next.js serves "starting from the base URL (`/`)" ([Next.js docs](https://nextjs.org/docs/app/api-reference/file-conventions/public-folder)); 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.jpg` is the classic reason [an og:image does not show](https://shareglint.com/en/guides/og-image-not-showing).

## 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](https://shareglint.com/en/guides/animated-og-images-gif-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](https://shareglint.com/en/og-image-size).

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.

## FAQ

### Which image format should I use for og:image?

JPEG for photos and most designs, PNG for flat graphics with few colours. They are the only two formats that no platform excludes and that Facebook, X, Discord, Mastodon and LinkedIn's upload specifications all list. Keep the file under 600 KB so WhatsApp takes it too.

### Does LinkedIn support WebP for link previews?

LinkedIn does not say. Its link-preview requirements name no formats at all; the formats it lists elsewhere, for single image ads and its Images API, are JPG, PNG and GIF. WebP may work, but nothing from LinkedIn promises it, so use JPEG or PNG.

### Can og:image be an SVG?

Not reliably. X's card documentation says SVG is not supported, Discord's list of image formats leaves it out, and no other platform lists it. Export the same design as PNG or JPEG.

### Can og:image be a WebP or AVIF file?

WebP is documented by X, Discord and Mastodon; AVIF only by Discord. Facebook's og:image:type allows only image/jpeg, image/gif or image/png, and LinkedIn, WhatsApp, Slack, Telegram and iMessage document no formats, so a WebP or AVIF og:image is a bet on undocumented behaviour there.

### What is opengraph-image.png?

A Next.js file convention: an opengraph-image.jpg, .jpeg, .png or .gif placed in an app route folder makes Next.js add the og:image tags for that route. Next.js fails the build if the file is over 8 MB, or over 5 MB for twitter-image.
