guys, i would like to know if sorl-thumbnail have any option to crop from the bottom to the top... i have a litter problem, in some picture sorl-thumbnail is croping the head of the people in pictures.
Thanks
guys, i would like to know if sorl-thumbnail have any option to crop from the bottom to the top... i have a litter problem, in some picture sorl-thumbnail is croping the head of the people in pictures.
Thanks
I've just released a new version of sorl-thumbnail (3.2.5) with cropping from edge and smart cropping inspired by btol45's answer.
Quoting the docs:
I don't believe this is built into solr-thumbnails yet, but here's a plugin I cribbed from reddit that accomplishes what you're after. It's not perfect, but it tends to get the job done. It doesn't crop from bottom to top, but rather uses the entropy of the slices to determine what end to crop from. It's a slight improvement on the reddit version as it handles either portrait or landscape images.
This question is old, but, since it appears as the first result in Google when searching for django smart crop, I want to add my little grain.
This "crop=auto" feature got added to sorl, but later, it got removed again. So, for others who might come with this need, you can try:
https://github.com/francescortiz/image
which allows you to set the center of attention of an image through the admin.
While the original answer no longer works, in recent versions of sorl, you can specify space-separated x and y crop values. For example, crop="center top", will center in X but keep the top in Y, which was better for pictures of people in my case, but not perfect.