Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10-portrait-images-with-exif-data-get-rotated-when-resizing #10

Closed
Dartegnian opened this issue May 26, 2023 · 1 comment · Fixed by #11
Closed

10-portrait-images-with-exif-data-get-rotated-when-resizing #10

Dartegnian opened this issue May 26, 2023 · 1 comment · Fixed by #11

Comments

@Dartegnian
Copy link
Contributor

const compressStories = () =>
	src("stories/**/*.{jpeg,jpg}")
		.pipe(
			sharpResponsive({
				formats: [
					{
						width: 1024,
						format: "jpeg"
					},
				],
			})
		)
		.pipe(dest("src/assets/stories"));

I've tried several Sharp-specific options and JPEG-specific options so far and none of them work. The issue is similar to this Sharp issue.

@Dartegnian
Copy link
Contributor Author

Hi, I made a pull request for this issue. It fixes this issue by calling the rotate function in Sharp before the resize function.

@khalyomede khalyomede linked a pull request May 27, 2023 that will close this issue
khalyomede pushed a commit that referenced this issue May 27, 2023
Fixes portrait images with metadata being rotated to the wrong orientation
@khalyomede khalyomede changed the title Portrait images with EXIF data get rotated when resizing 10-portrait-images-with-exif-data-get-rotated-when-resizing May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant