tripviss / image-resizer

On-the-fly image resizing using Node.js and libvips. Heroku Ready!
MIT License
73 stars 45 forks source link

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

Open tuananh opened 7 years ago

tuananh commented 7 years ago

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 commented 7 years ago

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

tuananh commented 7 years ago

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

teohhanhui commented 7 years ago

Given the environment variables:

AUTO_ORIENT=true
REMOVE_METADATA=true

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

See https://github.com/tripviss/image-resizer/blob/7bff1c202d882745925bc0b4d01bff125e0899a5/src/streams/resize.js#L49-L59

teohhanhui commented 7 years ago

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 commented 7 years ago

@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