I was curious if it was possible to look at an images width, and if the width is less than X number, then it would get a certain class.
Essentially I want to specify three classes for images like so:
- If width is less than 100px then the image itself will have the class .small
- If width is less than 400px then the image itself will get the class .medium
- If width is less than 600px then the image itself will get the class .large
.. etc If I need to add more sizes and classes
Is this possible?