entity_image_src
Retrieves an image string to be used in src attributes.
Example
1
| {{ '123' | entity_image_src: 'sku', 'any', 1 }} => data:image/jpeg;base64, ...
|
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 string or null if no image is found |