Developer forum

Forum » PIM » Trigger resize automatically?

Trigger resize automatically?

Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Currently, you must (at least in version 9) navigate to the image folders to trigger the resize process. We upload a bunch of images via FTP as part of an ERP integration. Is there anyway to trigger the resizing of these images without having to go into the folders? 

 

Cheers

//STeve


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Stephen

There is no way to trigger this automatically. We recommend using GetImage to resize images by the frontend. The resize feature has been removed in DW10.

BR Nicolai

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Hi Nicolai. Yes I see the GetImage resize can be used to specify the same cropping / quality as the folder properties, and there is a developer tool to test it. But I find no image objects (in the standard swift package where you can specify the parameters passed to the GetImage request. We are using pattern matching, I dont know if that affects the chances of being able to do it this way?

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You surely can use getimage in Swift. But the templates is coded with what we find appropiate. Using imagepatterns is just a way to find the images - Swift still renders them using GetImage.

E.g. here : https://github.com/dynamicweb/Swift/blob/fa9e8e70bf0c0f65e437351b874a57b48de933bd/Swift/Files/Templates/Designs/Swift/Paragraph/Swift_ProductDefaultImage.cshtml#L39C2-L41C134 and here: https://github.com/dynamicweb/Swift/blob/main/Swift/Files/Templates/Designs/Swift/Components/Image.cshtml

In Dynamicweb there is one setting to overrule the default quality for webp images - find it under settings, http:

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

Yes the quality setting I have seen before, but there is no "autocrop" setting which can be applied to all images I guess?

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Stephen

GetImage has a Crop parameter - and it is only setable from the template.

 

You must be logged in to post in the forum