What Is oEmbed?

oEmbed is an open standard that lets websites provide rich previews of their content when a URL is pasted into another platform. Instead of showing a plain text link, the consuming platform fetches metadata from an oEmbed endpoint and renders a rich embed — an image preview, a title, dimensions, and attribution.

You've seen this in action: paste a YouTube link in Discord and it shows the video thumbnail with a play button. Paste a tweet URL in Slack and it renders the full tweet. The same mechanism now works for images hosted on kinja-img.com.

How It Works on kinja-img.com

Every image viewer page (kinja-img.com/i/{id}) includes an oEmbed discovery tag in its HTML head:

<link rel="alternate"
      type="application/json+oembed"
      href="https://kinja-img.com/api/oembed?url=...&format=json"
      title="Image on kinja-img.com">

When a platform that supports oEmbed discovery encounters this tag, it automatically fetches the oEmbed endpoint and gets the image metadata. No configuration needed — just paste the viewer URL.

The API Endpoint

You can also call the oEmbed endpoint directly:

GET https://kinja-img.com/api/oembed?url=https://kinja-img.com/i/{id}&format=json

Response:

{
  "version": "1.0",
  "type": "photo",
  "title": "Image on kinja-img.com",
  "url": "https://i.kinja-img.com/{hash}/image.png",
  "width": 1920,
  "height": 1080,
  "provider_name": "kinja-img.com",
  "provider_url": "https://kinja-img.com",
  "thumbnail_url": "https://i.kinja-img.com/{hash}/w_400/image.png",
  "thumbnail_width": 400,
  "thumbnail_height": 225
}

Optional parameters: maxwidth and maxheight — the endpoint will return a scaled-down thumbnail_url that fits within these constraints while maintaining aspect ratio.

Responses include a 1-hour cache header (Cache-Control: public, max-age=3600) so platforms don't re-fetch on every page load.

Supported Platforms

Any platform that supports oEmbed auto-discovery will work. Tested platforms include:

  • Discord — paste a viewer link and Discord will show the image as a rich embed with dimensions and provider info
  • Slack — unfurls the image with a preview thumbnail
  • WordPress — the block editor auto-embeds kinja-img.com links as images
  • Notion — paste a link and Notion offers to create a bookmark or embed
  • Ghost, Medium — paste a link and the editor shows a preview card

If a platform supports the <link rel="alternate" type="application/json+oembed"> discovery mechanism, it will work automatically.

Expired & Protected Images

The oEmbed endpoint handles special cases gracefully:

  • Expired images — returns HTTP 410 Gone so the consuming platform knows the content is permanently removed
  • Password-protected images — returns HTTP 403 Forbidden with a message indicating the image requires a password
  • Non-existent images — returns HTTP 404 Not Found
  • Invalid URL format — returns 400 Bad Request

These proper HTTP status codes ensure that platforms can handle error states correctly rather than showing broken embeds.

For the full API documentation, visit the API & Integrations page.