astro-imagetools icon indicating copy to clipboard operation
astro-imagetools copied to clipboard

Img tag randomly rotates images

Open JacobWeisenburger opened this issue 2 years ago • 1 comments

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

JacobWeisenburger avatar Oct 12 '22 20:10 JacobWeisenburger

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 🙏🏼

silveltman avatar Dec 15 '22 13:12 silveltman