@wocart/storefront / index / MediaImageParams
Interface: MediaImageParams
How to show a photo; an omitted value is left to the host's default.
Properties
fit?
optionalfit?:"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?
optionalformat?:string
auto lets the host pick the best format the browser takes.
height?
optionalheight?:number
quality?
optionalquality?:number
Encoder quality, 1–100.
width?
optionalwidth?:number