Wocart

@wocart/storefront v3.1.0


@wocart/storefront / index / pictureOf

Function: pictureOf()

pictureOf(image, delivery): Picture

A picked image as a theme draws it: its URL in the store's media, its alt text (empty when the merchant wrote none), its size, and its focal point as object-position, so a cropped photo keeps what matters in view.

Parameters

image

PickedImage

delivery

MediaDelivery

Returns

Picture

null when no image is picked, the key is not a Media Key, or there is no delivery.