Forum

Thread tagged as: Question

image uploads to assets

Sorry I'm having a Friday moment... what setting where controls (re)sizing of images uploaded directly to Assets?

Charlie Elsey

Charlie Elsey 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

There aren't any - the images are resized based on context as they're used.

Thanks Drew, so below is my template snippet where user can select an image previously uploaded in its native dimensions to assets

Obviously the image is getting resized to 500 square... if I just want it resized to max width of 500 AND maintain aspect ratio, can I just drop the height parameter

<img src="<perch:shop id="image_2" type="image" label="Product Image 2" width="500" height="500" crop="false" />" />
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, that's correct. Is it not working how you expect?

thanks Drew, yes it behaves as expected EXCEPT when user uploads images less than 500 pixels wide - DOH. sorted now