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