One option would be to do it client-side via javascript – set up some javascript to run after the page loads and cycle through all featured images that are on the page, get their dimensions and then add the class as need be. You can use the img.naturalWidth
and img.naturalHeight
parameters of the image element, and the use addClass('full')
to add the class if the image’s height and width are large enough.