RafidMuhymin / astro-imagetools

Image Optimization tools for the Astro JS framework
astro-imagetools-docs.vercel.app
MIT License
407 stars 44 forks source link

Img tag randomly rotates images #132

Open JacobWeisenburger opened 2 years ago

JacobWeisenburger commented 2 years ago

I have a bunch of images that I'm using astro-imagetools/components/Img to optimize. However, it seems that some of my images got rotated by astro-imagetools/components/Img, but not rotated with the standard html <img /> tag.

Can someone tell me why this is happening and how to fix it?

html img tag
<img
    src={`/src/../public/Photos/jake-and-melissa-sitting-on-a-couch-cheek-to-cheek-smiling.jpg`}
    alt={"alt"}
    width={200}
/>

astro-imagetools/components/Img
<Img
    src={`/src/../public/Photos/jake-and-melissa-sitting-on-a-couch-cheek-to-cheek-smiling.jpg`}
    alt={"alt"}
    width={200}
/>

image

silveltman commented 1 year ago

I believe sharp has an option to automatically rotate images in the 'correct' way (not 100% sure tho)

May the default value for this options is true and the tool 'thinks' it's doing the right thing.

Hopefully someone can elaborate on this 🙏🏼