Forum
Specifying thumbnail sizes with the API asset importer
We are importing product images with the API. How do you specify for example 2 types of thumbnails?
$result = $Importer->add_item([
'type' => 'image',
'bucket' => 'default',
'path' => __DIR__.'/images/0C7A1073.jpg',
]);
Do we have to add an array of thumbnail sizes?
You'd specify that in your template as normal.
templates/content/image.html ?
Whichever template you're using. If you're importing with
PerchShopProductImporter
then it'll be your product template - usuallyproduct.html
That worked Drew. Now how do you specify or select that custom image size that was generated? transmitter-nm-956-3-
w248h260
.jpgAgain, in your template. None of this is different from basic use. Use the same
width
,height
andcrop
attributes.