Images

Every image path in an amodb response loads from https://img.amodb.dev/t/p/{size}/{file}. Sizes match TMDB: w92, w154, w185, w300, w342, w500, w780, w1280, h632 and original. Images need no key and do not count toward your rate. The edge keeps them for 30 days, and /3/configuration returns the base URLs.

URL pattern

{file} is the path from a response field such as poster_path, backdrop_path, profile_path, still_path or logo_path. It already starts with /.

Text
https://img.amodb.dev/t/p/{size}/{file}
Text
https://img.amodb.dev/t/p/w500/pB8BM7pdSp6B6Ih7QZ4DrQ3PmJK.jpg

Sizes

SizeWidth or heightGood for
w9292 px wideSearch suggestions
w154154 px wideDense lists
w185185 px wideGrids on desktop, profile photos
w300300 px wideBackdrop thumbnails, OMDb Poster
w342342 px wideGrids on phones with high density screens
w500500 px wideDetail pages
w780780 px wideLarge posters, medium backdrops
w12801280 px wideFull width backdrops
h632632 px highProfile photos at full height
originalSource sizeDownloads and print

Posters are 2:3. Set width and height on the <img> so the page does not shift while it loads.

Base URLs from the configuration endpoint

GET /3/configuration returns the same structure as TMDB. Clients that build image URLs from it work without changes.

The edge keeps /3/configuration for 24 hours, so reading it once per day is enough.

JSON
{
  "images": {
    "base_url": "http://img.amodb.dev/t/p/",
    "secure_base_url": "https://img.amodb.dev/t/p/",
    "poster_sizes": ["w92", "w154", "w185", "w342", "w500", "w780", "original"]
  }
}

Responsive images

JavaScript
const base = "https://img.amodb.dev/t/p";
const srcset = ["w185", "w342", "w500"]
  .map((size) => `${base}/${size}${movie.poster_path} ${size.slice(1)}w`)
  .join(", ");

const html = `<img src="${base}/w342${movie.poster_path}" srcset="${srcset}"
  sizes="(min-width: 64rem) 185px, 33vw" width="342" height="513"
  alt="${movie.title} poster" loading="lazy">`;

Caching

Images stay in the edge cache for 30 days. Store the file path with your record and build the URL when you render it, so you can switch sizes later without new API calls.