Fit an image into a fixed thumbnail box using contain or cover.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
A source image is fitted into a target box using contain or cover logic, optionally cropped around a focal point, and resampled into the thumbnail dimensions. The output may add a background or preserve alpha depending on the format.
data:image/png;base64,iVBORw0KGgo=
150×150 PNG thumbnail preserving the source aspect ratio
CMS previews, contact sheets, and search-result cards generate thumbnails.