# Image filter module

**URL:** <https://www.ruby-forum.com/t/image-filter-module/244163>\
**Category:** NGINX\
**Created:** [February 29, 2016, 3:09pm UTC](https://www.ruby-forum.com/t/image-filter-module/244163 "2016-02-29T15:09:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [February 29, 2016, 3:09pm UTC](https://www.ruby-forum.com/t/image-filter-module/244163/1 "2016-02-29T15:09:31Z")

</div>

Hello,

I just installed image filter module for resizing images.  
It worked as expected but we faced an issue that this module doesn’t  
respect EXIF so some images are being rotated to the original state then  
nginx resize it.  
Any idea how to fix this?

Thanks

Ayman

Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![Ayman\_Al-Shorman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/48db29/32.png) [@Ayman\_Al-Shorman](https://www.ruby-forum.com/u/Ayman_Al-Shorman)\
**Post date:** [February 29, 2016, 4:03pm UTC](https://www.ruby-forum.com/t/image-filter-module/244163/2 "2016-02-29T16:03:53Z")

</div>

Hi Ayman,

The module uses the GD library underneath which doesn’t support EXIF  
rotation (or really any of EXIF). In addition the module will strip off  
the EXIF data if it is more than 5% of the image size.

If you wish to preserve the EXIF you may need to make a microservice to  
do the resizing whilst either rotating using the EXIF or preserving the  
EXIF.

There are several examples on the internet on how to do this with a  
small PHP script using the EXIF and GD module or ImageMagick.

Kind Regards  
Andrew

On 29/02/16 14:09, Ayman Al-Shorman wrote:

> Sent from my iPhone
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

–  
Andrew H. (LinuxJedi)  
Technical Product Manager, NGINX Inc.
