Wocart

@wocart/storefront v3.1.0


@wocart/storefront / index / MediaImageParams

Interface: MediaImageParams

How to show a photo; an omitted value is left to the host's default.

Properties

fit?

optional fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze"

CSS object-fit words: cover and crop fill the box, contain and scale-down fit inside it (scale-down never enlarges), squeeze stretches, pad letterboxes.


format?

optional format?: string

auto lets the host pick the best format the browser takes.


height?

optional height?: number


quality?

optional quality?: number

Encoder quality, 1–100.


width?

optional width?: number