Image

An image attached to a product, variant, modifier, or other resource.

An image attached to a product, variant, modifier, or other resource.

Prefer a resized URL method (thumbnail_url, small_url, and so on) over url where possible to improve page load times.

Properties

height

The intrinsic height of the original image, in pixels.

nil until the blob has been analyzed (shortly after upload), so themes should treat this as optional.

Returns: Integer or nil

large_url

Resized CDN URL (max width 960px).

Returns: String

medium_url

Resized CDN URL (max width 720px).

Returns: String

name

The base filename of the original image, useful for alt text.

Returns: String

signature

The image's unique signed identifier.

Returns: String

small_url

Resized CDN URL (max width 540px).

Returns: String

thumbnail_url

Resized CDN URL (max width 405px).

Returns: String

url

The original, unresized CDN URL for the image.

Returns: String

width

The intrinsic width of the original image, in pixels.

nil until the blob has been analyzed (shortly after upload), so themes should treat this as optional.

Returns: Integer or nil

xlarge_url

Resized CDN URL (max width 1140px).

Returns: String

xxlarge_url

Resized CDN URL (max width 1920px).

Returns: String

On this page