Not so long ago, I told you how the storage and distribution of user images on Topface Developer Day ( presentation on speakerdeck ) is arranged in our Topface . Pictures we cut on the fly in nginx using image_filter.
People are mostly elongated in the vertical direction and photos of themselves for the dating service make appropriate, the designers want little squares, and nginx cuts out people not exactly what people are interested in (I mean the face). Using the example of longcat, you get something like the following:
You have to live with it in the usual way: take it and add it yourself. As a result, I got a patch for the image_filter module, which can tell which side of the image you do not need to cut off the edges when crop occurs. All good on github . ')
Customization
It's simple, you need to enter a directive in the location or server you need.