How to rotate each image of the post separately?

Hi

How can I rotate each image separately in a post?
When I include images in my post, some of them are automatically rotated.
Even after I rotated and re-saved the local images, no changes were made in the post.
I found the image processing config of Hugo, but this may be for the entire images.

I have solved this problem by reducing the size of the image, however, I still don’t know why this works.

It could be that too large images lead to memory issues so Hugo (or the image library that rotates) silently ignores the file. I would always resize the image first and then rotate the resulting image.

How do you rotate your images?

Oh no, I think I misread your question to be about WHY it does not rotate from a script you use in your asset pipeline. In general, if images rotate without YOU doing anything then they have an EXIF tag that tells us to rotate. If you hold your camera at an angle it sets this tag by itself and modern browsers and most file explorers read these tags and rotate accordingly.

I never had the need to rotate images, but maybe this post and it’s answers will help you: Image EXIF orientation