Forum

Thread tagged as: Question, Suggestions

Image Size Warnings

Hi, I was wondering if there is any way to throw up a warning if a user uploads an image which is smaller than the set size?

Reason is, I'm getting a client uploading images smaller than the thumbnail size and it's not cropping the image properly for the thumbnail.

I've noticed if the width is less than that specified, Perch then won't crop the image by heigh (even if the height is bigger than the specified height) and as a result I'm getting some images inserted whose height breaks my product listing grid.

This is how my image code looks on my detail page template, this sets the image size for the thumbnails on the listing page

<perch:content id="image-one" type="image" width="349" height="396" crop="true" label="Image One" required="true" suppress="true"/>

Pretty sure I've got that right... just need to find a way of re-enforcing to the client that they NEED to upload images bigger, hoping there might in the future be a way of bringing this alert into the admin panel.

Nik Gill

Nik Gill 1 points

  • 7 years ago

Currently forcing image size in CSS, but that's not always ideal

Drew McLellan

Drew McLellan 2638 points
Perch Support

How would you see it working ideally?

In a perfect world, I could define a pre-set minimum image size in my template and the admin panel would throw up an error for the user (be good to be able to define what the error says myself) if the image they were uploading didn't match these parameters... they could choose to either upload an alternative image or ignore the warning and post the image anyway.

The 'Help' text is good - but a lot of clients don't even read it and are quite surprised when I point it out.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, thanks, we'll keep that in mind.