Forum

Thread tagged as: Question

Image Compression Not Working

Hello,

I am using the following code in a content template I've created, hoping it would compress images upon upload:

                    <img src="<perch:content id="rentalimage" type="image" label="Rental image">" density="2" quality="30" sharpen="2" width="500" alt="<perch:content id="imagealt" type="text" label="Image description">" class="card-img-top">

After uploading, I'm not seeing any compression happening. I am uploading PNGs. Would this have anything to do with it?

Thank you in advance for your help, Trevor Brandt

Trevor Brandt

Trevor Brandt 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You need to put those attributes on the Perch tag. You have them on the HTML tag.

Thanks very much for your help. I appreciate it!