Wocart

@wocart/storefront v3.1.0


@wocart/storefront / review-media / prepareReviewPhoto

Function: prepareReviewPhoto()

prepareReviewPhoto(photo, options?, deps?): Promise<Blob>

A photo ready to send: drawn upright (the camera's orientation applied), no larger than maxEdge, re-encoded as WebP (JPEG where WebP cannot be written). When the browser cannot do it, the photo is sent as it is — the server still converts it and drops its EXIF.

Parameters

photo

Blob

options?

PhotoOptions

deps?

PhotoDeps

Returns

Promise<Blob>