问题
I rotated a few images on my computer, however, image resizer keeps using the old orientation. When I navigate to the image just using the image path, it shows up fine. However, when I add ?h=400, it's using the old orientation. What's causing this?
回答1:
The application you are using to rotate images is only setting the Exif Orientation metadata flag. ImageResizer will honor aforementioned metadata if you install the Autorotate plugin and specify &autorotate=true in the command string.
Browser and mail reader support for Exif Orientation is extremely spotty; I'm surprised your browser actually rotated the image.
Keep in mind that rotation is somewhat expensive; it's good to have your images actually rotated ahead of time, as it will make images render consistently and a bit faster (especially on mobile or slow connections).
ImageResizer does not output the exif orientation
flag, it always produces a true rotated image.
回答2:
ImageResizer is now able to rotate without the plugin. Just add &autorotate=true
to the URL.
See: https://imageresizing.net/docs/v4/reference
来源:https://stackoverflow.com/questions/25631063/imageresizer-rotation-issues