Finally I got rid of JPEG image compression in WordPress

antagonist

Registered Member
Joined
Oct 15, 2012
Messages
72
Reaction score
28
Boy, was I annoyed.

I pretty much accepted the fact that WordPress reduces the uploaded image quality by default - which sucks because I like my images clean and crisp.

Finally I found a neat little snippet to stop WordPress from reducing the image quality:

Code:
<?php add_filter('jpeg_quality', function($arg){return 100;}); ?>

Put this into your functions.php and you're good.

~
Credit goes to http://wp-snippets.com/keep-wordpress-from-compressing-jpgs/

PS: It seems that you need PHP 5.3.1+ installed on your webserver to make this work.
 
I like using png images, although the file size is much larger. If you have a solid cache plugin configured correctly it never becomes an issue from my experience.
 
I am also experiencing some troubles with regards to the quality of images in wordpress. Thank you for sharing this useful tip.
 
Perfectly said!, I agree on you mate! @op Here, You can get the plugin,
Check this out:http://wordpress.org/plugins/wp-resized-image-quality/

You can change the compression level of uploaded JPEG images and thumbnails.

Thanks mate. I have to admit I never thought about doing it with a plugin. And as it's really simple to implement the above snippet I will save the bandwidth for now.

I like simple solutions and I really just needed to get rid of the annoying image quality reducing "feature" :-)
 
Thanks mate, you helped me a lot. I was also looking for this jpg image solution in WP. It really works.
 
that's cool. Now good luck configuring the CDN. Use cloudflare or similar services to make sure that it loads up quickly :)
 
Back
Top