Forum

Thread tagged as: Question

How to check if an image is a square or a rectangle

Hi, I need add a class to an image if it's square (w=h). Is there a sensible method of doing this within a perch template? I was looking at <perch:if> plus image tag output="w/h", but it doesn't look like I can use a condition with a tag in the id field.

Any suggestions?

Thanks

Oliver Lowe

Oliver Lowe 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't think there's a simple way to do that, no.