• Hi. I have been testing out tweaking the default image compression with the filter below. As I understand it, the 100 value should turn off compression.

    I found when I “scale” images down in the WordPress Image Editor the file size got much bigger than the original image file size. I thought it might stay the same, or get a little smaller, but not so much bigger.

    90 seems to work better, but I am just wondering why setting it to 100 would actually make the file size get bigger? Thanks.

    add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) );

    • This topic was modified 2 years, 5 months ago by WPWanderer.
    • This topic was modified 2 years, 5 months ago by WPWanderer.
    • This topic was modified 2 years, 5 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 3 replies - 1 through 3 (of 3 total)
  • Setitng compression to 100 doesn’t disable it, it makes it 100% quality, which results in very big files.

    There’s no reason at all to set compression to 100. Especially if the images that you’re uploading have been saved at a lower compression to start with, as seems to be the case here. A normal value for that is anywhere from 80 to 50 depending on image resolution and display size, so try something like that.

    Thread Starter WPWanderer

    (@wpwanderer)

    @catacaustic Thanks for the response. I read that before 4.5 the default used to be 90%, now it is 84%. Does that sound correct to you? Sometimes I need to have a bit crisper images. So, thinking 90% might work well.

    I don’t know what the values were/are. I haven’t needed to worry about that so far. ??

    As far as “crisp”, you’re better off with a larger pixel size scaled down to display then to decrease compression. As am example, an image that’s set with 70% compression that’s 600 x 600 pixels will normally look the same or better then an image that’s 90% compression that’s 300×300 when they are both displayed at 300 x 300 pixels.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing default Image Compression’ is closed to new replies.