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

Rotate in output #48

Open
wireinet opened this issue Jun 6, 2023 · 1 comment
Open

Rotate in output #48

wireinet opened this issue Jun 6, 2023 · 1 comment

Comments

@wireinet
Copy link

wireinet commented Jun 6, 2023

Hello. In output, i get a rotated version. How i can avoid this? In input jpg i have vertical image, in output webp – horizontal, Can't find option in api to control this behaviour

@minsoo-web
Copy link

Hi, I had the same problem and it was because the exif metadata of the image was missing.

Can you try something like this?

import imagemin from "imagemin";
import imageminWEBP from "imagemin-webp";

const files = await imagemin(["sources/*.{jpg,png,jpeg}"], {
  destination: "build",
  plugins: [
    imageminWEBP({
      metadata: ["exif"], // or you can put ['all']
    }),
  ],
});

console.log(files);

You can find a more detailed explanation at https://github.com/imagemin/imagemin-webp?tab=readme-ov-file#metadata.

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

No branches or pull requests

2 participants