format.unsupported

Image format is not PNG, JPEG or GIF. Level: Error.

When it is raised

Raised when the card image loads with an image/* Content-Type that does not contain "webp" and is not image/avif, image/png, image/jpeg, image/jpg, image/pjpeg or image/gif. Common cases are image/svg+xml, image/bmp, image/tiff, image/x-icon and image/heic. A non-standard alias such as image/x-png also lands here, because the header, with any parameters removed and lowercased, is matched exactly.

What it does to a shared link

The message names the format from the Content-Type subtype in capitals (for example SVG+XML) and recommends PNG, JPEG or GIF. The API reads dimensions only from files whose first bytes are PNG, GIF, JPEG or WebP, so for SVG, BMP, TIFF, ICO, HEIC and other formats the dimension, aspect-ratio, crop and declared-size mismatch checks do not run, and the transparency checks do not examine the image. The file-size checks still run.

How to fix it

  1. Export the card image as PNG or JPEG; for an SVG, render it to a 1200 × 630 PNG.
  2. Point og:image (and twitter:image, if the page sets it) at the new file.
  3. If the file already is PNG, JPEG or GIF, correct the server's Content-Type header to image/png, image/jpeg or image/gif.
<meta property="og:image" content="https://example.com/card.png"> <meta property="og:image:type" content="image/png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="630">

Related checks