We did a similar thing a while back when we had a similar layout on an early news site. Then I used math to make our code smarter instead.<p>Rather than having lots of weird image sizes dictate my layout, I decided to have my weird layout dictate my image sizes. The result was this:<p><a href="https://www.mashape.com/stremor/automatic-image-crop-and-resize" rel="nofollow">https://www.mashape.com/stremor/automatic-image-crop-and-res...</a><p>Yes. This really does crop images for any aspect ratio. Automatically. Yes, if you try and make a picture that is just your face be 1080 tall and 90 wide it will likely choose just your nose. What do you want it to do in that scenario? this is meant for taking 4:3 and making them square, or 16:9 and making them 9:16, not for taking 16:9 and making it 1:4. But it will try its darnedest.