Skip to main content

DPI - Dots Per Inch

Use the dpi transformation to set image density for delivery workflows that depend on DPI metadata or vector input rasterization.

Overview

For raster images, pixel dimensions usually matter more than DPI for web rendering. DPI becomes relevant when Imgwire reads density-sensitive input or when metadata is preserved in the output variant.

Syntax

FieldValue
Canonical parameterdpi
Accepted valuesInteger from 1 through 600

Example

https://cdn.imgwire.dev/{organization_id}/{environment_id}/{image_id}?format=jpg&dpi=300&strip_metadata=false
image.url({
format: 'jpg',
dpi: 300,
strip_metadata: false,
});
imgwire images url img_123 --format jpg --dpi 300 --strip-metadata false

When to use this

  • You need a preserved output density value for a downstream workflow.
  • You are working with density-sensitive source formats.
  • You are producing image variants for workflows where metadata density is inspected outside the browser.

Best practices

  • Use pixel dimensions for web layout sizing.
  • Pair dpi with strip_metadata=false when the density metadata must remain in the delivered output.
  • Keep DPI values practical; high DPI metadata does not create new source detail by itself.

Common mistakes

  • Expecting dpi=300 to make a web image visually sharper at the same pixel dimensions.
  • Setting DPI while also stripping metadata from the output.
  • Using DPI where Width, Height, or DPR is the relevant control.

Last updated at: May 9, 2026