Board Thread:Support Requests - Getting Technical/@comment-131168-20150406131834

We use a template that (in part) takes an image, resizes it to width 100, and crops to the top 100 pixels. This works fine for the majority of portrait images, but not so much for landscape images. After searching for a solution and testing various ones, I seemed to get an alternate template going so it would instead resize to 100 height and then crop to the middle 100 pixels. The relevant portion comes out like this:



Using it with an image from community.: 

Works for me on Firefox, but from what others have said on some browsers (such as default iPhone/iPad browser set to view desktop site) it's still just cropping to the left part of the image, so I started looking around for another possible solution. However, so far they've all involved things like adding styles to img tags, loading the image URL as the background to a div, or knowing precise image width ahead of time. I don't suppose anyone else knows another way? 