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

Add option to strip EXIF profiles #68

Merged
merged 2 commits into from
Jan 23, 2018

Conversation

driehuis
Copy link
Contributor

Implementations of ImageMagick differ in whether or not they strip EXIF profiles by default, so this pull request may not be relevant to all users (then again, it won't hurt either).

This pull request adds an option to call img.strip! before saving the resized image. In my use case, this strips about 15% of the average size of the images on my website. For users of Adobe products that secretly stash a copy of Websters Dictionary in each saved image, the savings would be even greater.

The preservation of EXIF data is hit or miss anyway, so a case could even be made to make strip be true by default. But I'm not sure if there are use cases for EXIF on the web, so I made strip false by default to minimize the risk of surprises.

@coveralls
Copy link

coveralls commented Jan 19, 2018

Coverage Status

Coverage decreased (-0.5%) to 99.528% when pulling 826b5f7 on driehuis:master into c9da267 on wildlyinaccurate:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 99.528% when pulling 826b5f7 on driehuis:master into c9da267 on wildlyinaccurate:master.

@driehuis
Copy link
Contributor Author

I'll try to come up with a test for this feature.

@coveralls
Copy link

coveralls commented Jan 19, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling cafec3c on driehuis:master into c9da267 on wildlyinaccurate:master.

@wildlyinaccurate
Copy link
Owner

Hey, thanks so much for submitting this! The code looks good to me; I'll just test it out on a couple of sites and then hopefully get a new version of the Gem out this week 😄

@wildlyinaccurate wildlyinaccurate merged commit b628a11 into wildlyinaccurate:master Jan 23, 2018
@wildlyinaccurate
Copy link
Owner

wildlyinaccurate commented Jan 23, 2018

This is in v1.5.0 of the gem. Thanks a bunch @driehuis!

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 this pull request may close these issues.

3 participants