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

[Feature request] Rotate image to correct orientation before stripping EXIF data #42

Open
tuananh opened this issue May 15, 2017 · 5 comments
Labels

Comments

@tuananh
Copy link

tuananh commented May 15, 2017

Because we're stripping all meta data, it would be a good idea to rotate the image to correct orientation before stripping it, wouldn't it?

@tuananh
Copy link
Author

tuananh commented May 15, 2017

Sorry didn't read docs carefully. The option is there.

@tuananh tuananh closed this as completed May 15, 2017
@tuananh
Copy link
Author

tuananh commented May 15, 2017

I tried REMOVE_METADATA='false' but it doesn't seem to work.

@tuananh tuananh reopened this May 15, 2017
@teohhanhui
Copy link
Contributor

Given the environment variables:

AUTO_ORIENT=true
REMOVE_METADATA=true

The auto-rotate is applied before the metadata is removed.

See

// if allowed auto rotate images, very helpful for photos off of an iphone
// which are landscape by default and the metadata tells them what to show.
if (env.AUTO_ORIENT) {
r.rotate();
}
// by default we remove the metadata from resized images, setting the env
// var to false can retain it.
if (!env.REMOVE_METADATA) {
r.withMetadata();
}

@teohhanhui
Copy link
Contributor

I tried REMOVE_METADATA='false' but it doesn't seem to work.

Where are you setting that? You may be using the wrong syntax.

@tuananh
Copy link
Author

tuananh commented May 15, 2017

@teohhanhui I added that line to .env file. Running locally with gulp watch; showing the environment is loaded correctly as well

2017-05-15 at 7 55 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants