Connect with us

How to control WordPress jpeg Image Compression?


How to control WordPress jpeg Image Compression?

Some of you WordPress site owners who are very particular about your images and image quality may have noticed that upon upload of your graphics to WordPress that your images lose just a little bit of quality.  Well, you are right, WordPress actually saves it’s uploaded files to 90% quality JPEG files during the “crunching” process.  And for those select few that are bothered by this 10% drop in quality, well there is an easy fix!  Plop the single line below into your themes functions.php file and BAM!, image quality is set to 100% moving forward.

add_filter('jpeg_quality', function($arg){return 100;});


The same concept could apply to those of your trying to save just a wee bit of disk space.  You could alternatively bump the quality down to 75% or 80% to make file sizes smaller while still maintaining some decent looking images.  That snippet below is included:

add_filter('jpeg_quality', function($arg){return 80;});


The choice is yours, up it, down it, or just leave it alone.  Just another flexible option of WordPress.

Related:  Basic SEO – Do It Youselfer (DIY) Using Some Basic PHP Code
Continue Reading
You may also like...

We are a WordPress plugin developer company that focuses on useful WordPress plugin creation and empowering people to earn passive incomes from their blogs. We build unique and groundbreaking plugins that will revolutionize your blog!

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

More in solution

    Sign up for our newsletter and get a free affiliate e-book!

    About Me:

    Szabi Kisded

    Hi, my name is Szabi and I'm documenting my journey selling plugins on CodeCanyon. I will show you every step of it: learning to code, plugin ideas, WordPress stuff and more. Read more…

    Mega Plugin Bundle:

    CodeCanyon Portfolio:

    Online Courses:

    Latest Promotions:

    Recommended Theme:

    Start Your Own Blog:

    Translate Your Blog:

    AdSense Alternative:

    Best Article Spinner:

    Popular Posts:

    Latest Posts:

    To Top

    Privacy Preference Center