sku_image_preview_src

Retrieves an image preview string for a SKU to be used in src attributes.

Example

1
{{ '123' | sku_image_preview_src: 'any', 1 }} => data:image/jpeg;base64, ...

Input

Type Parameter Description Required
string entityId The ID of the SKU to retrieve the image for. Comes before the | sign. Required
string withAccessRole The access role to retrieve the image for, defaults to ‘any’  
int number The number of the image to retrieve, defaults to 1  

Output

Type Description  
string null The image preview string or null if no image is found