Hello,
I have an old and proven to work config like this (like, literally, for dozen of years):
server {
listen 8085 default;
listen [::]:8085 default;
root /usr/local/public/storage;
location ~ ^/resize/([\d\-]+)x([\d\-]+)/(.+) {
set $width $1;
set $height $2;
rewrite ^/resize/([\d\-]+)x([\d\-]+)/(.+) /$3 break;
image_filter resize $width $height;
image_filter_buffer 10M;
image_filter_jpeg_quality 85;
}
location ~ ^/crop/([\d\-]+)x([\d\-]+)/(.+) {
set $width $1;
set $height $2;
rewrite ^/crop/([\d\-]+)x([\d\-]+)/(.+) /$3 break;
image_filter crop $width $height;
image_filter_buffer 10M;
image_filter_jpeg_quality 85;
}
}
(yeah, I'm awared that it's better to use all of this with secure link module, but this is a temporary test). This config works quite well, but suddenly some "vertical" images gets rotated instead of cropping:
original:
https://storage.test.tpark-it.ru/temp/2a569fff220c6d40cbb43ae65c142028.jpg
derivative:
https://storage.test.tpark-it.ru/crop/100x100/temp/2a569fff220c6d40cbb43ae65c142028.jpg (notice it's rotated)
Why is that ? Really cannot figure this out. Seems like this is the only pic so far. Others seems to do well:
https://storage.test.tpark-it.ru/3641f5e9a89b8eb49eae2d408235fad9.png
https://storage.test.tpark-it.ru/crop/100x-/3641f5e9a89b8eb49eae2d408235fad9.png
Does this have something to do with the fact that this "bad" pic is "vertical" ?
Thanks.