entity_image_preview_src

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

Example

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

Input

Type Parameter Description Required
string entityId The ID of the entity to retrieve the image for. Comes before the | sign. Required
string modelName The name of the model to retrieve the image for  
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  
string fileNameFilter The filter to apply to the file name, defaults to ‘’  

Output

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