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

Set image quality #8

Closed
koertho opened this issue Jun 9, 2016 · 4 comments
Closed

Set image quality #8

koertho opened this issue Jun 9, 2016 · 4 comments

Comments

@koertho
Copy link

koertho commented Jun 9, 2016

Sometimes the thumbsnail generated with this library have a bigger file size then the original files, even when they have a bigger resolution. The problem is, that the generated images (jpg) have always 100% image quality. It would be great to set the file quality in the parameter or the library should use the quality of the original image.

@koertho
Copy link
Author

koertho commented Jun 9, 2016

I've integrated this feature in my fork (just for jpeg). Can do a pull request, if you want (I never did this before).

@jamiebicknell
Copy link
Owner

I've never been keen on having a query string option that only applies one particular file format, but I do agree that the quality should be able to be customised somewhere. Instead I think it's best if the quality was configured as a constant and same for each instance.

View commit here: 0930eea

@koertho
Copy link
Author

koertho commented Jun 9, 2016

That's perfect. Thank you!

@jamiebicknell
Copy link
Owner

The constant is my preference as I feel the quality wouldn't change on a per image basis, but more or a per install/instance basis. If you do use you're query string version, don't forgot to also add the quality option to the $file_hash variable.

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