Resize Without Cropping — Letterbox vs Cover

(Updated: July 16, 2026 ) images resize aspect-ratio

A product thumbnail comes back from “quick resize” with the brand label sliced off the bottom. Someone forced a square crop with cover semantics when the asset was a tall pack shot. The opposite failure — letterboxing with huge empty bars — shows up when contain is used inside a layout that expected a filled tile. Resizing without thinking about fit mode is how marketing assets silently degrade.

Two verbs you must name explicitly

Contain (letterbox / pillarbox) — Scale uniformly until the entire image fits inside the target rectangle. Empty regions appear if aspects differ. Nothing important is cropped; the frame may not be fully filled.

Cover (crop to fill) — Scale uniformly until the rectangle is filled. Overflow is cropped. The frame is full; edges of the subject may disappear.

Stretch (non-uniform) — Force exact width and height independently. Distorts the subject. Avoid for anything with type, faces, or packaging.

If a ticket says “resize to 1200×630” without saying contain or cover, you do not yet have requirements.

Decision guide by use case

DestinationPreferWhy
Product catalog tileCover with focal point, or shoot for the ratioGrid expects filled cells
Legal / label must stay wholeContain + backgroundCropping text is a defect
Blog hero / OG imageCover with careful focal cropPlatforms expect exact ratios
App icon from a wide logoContain on brand-colored canvasDo not squash the wordmark
Background textureStretch sometimes OKNo critical geometry

For faces and packaging, set a focal point (CSS object-position, or crop tools with face detection) when you choose cover.

CSS vs export pipeline

In the browser:

.thumb {
  width: 240px;
  height: 240px;
  object-fit: cover; /* or contain */
  object-position: center 20%;
}

object-fit does not replace exporting correctly for email, ads, or stores that ingest flat files. Those systems need pixels already correct.

In an export tool: lock aspect ratio, choose the fit mode, then set the target box. Preview at 100% — letterboxing that looks fine in a dark UI can look broken on a white marketplace background. Paint letterbox bars a deliberate brand color when contain is required.

A workflow that prevents “squashed” uploads

  1. Read the platform’s required dimensions and whether cropping is allowed.
  2. Compare source aspect to target aspect.
  3. If they match, scale uniformly to size.
  4. If they differ, pick contain or cover in writing.
  5. Soft-proof: zoom to the region that holds text or logos.
  6. Only then run compression (WebP/JPEG quality).

Use image-resize when you need a quick, local resize with aspect lock before you drop files into a CMS — confirm the output ratio matches the slot you are filling.

Talking to design and marketing

Document a one-pager:

  • Default for product grids: cover, focal center-top
  • Default for certificates / full-pack shots: contain on #FFFFFF
  • Forbidden: stretch to “make it fit”

When someone asks why there are bars, point at the doc instead of re-litigating geometry every sprint.

Quick red flags in review

  • Width and height both set on export with “don’t maintain aspect” checked
  • Square crop of a wide banner that cuts off the CTA text in-frame
  • Different fit modes across the same product carousel

Name the fit mode, lock the ratio, and treat cropping as a product decision — not an export checkbox you click under time pressure.