Problems with image compression

Hi there,

I’m having problems with the automatically jpeg compression of wordpress. I’m building a woocommerce shop and added prodocut pictures with #fff white background. WP is now compressing them and is adding lines with #fefefe color to them which doesn’t looks good. So I’ve googled and found out that I can add

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

to the functions.php of X-Child to deactivate the compression. After that I’ve regenerated the thumbnails. But now it’s worse than before. Could you explain how to solve my problem?

Thank you!

Hello @knowmates,

Thanks for asking. :slight_smile:

I am unable to replicate the problem on my end. I don’t see any sort of issues with the image background. Please see screenshot https://screencast.com/t/sfG98o0ehiW. Perhaps you can try clearing the browser cache and reload the website.

Thanks.

Hi Prasant,

sure there are background issues, too. Just download the picture and open it in gimp, there you will see it. I’ve done this with you screenshot, please see attached :slight_smile:

Thanks

Hello There,

Thanks for the screenshot. This is something that WordPress has control over with. Please check out this links:


Thank you for your understanding.

Hi RueNel,

I’ve already found these information on my own and tried to get done with this. But it also helped not. There’s still an additional compression of the images with made the background a different color on some arrays.

Hi,

This is more of a wordpress issue rather than the theme.

The additional compression might be coming from regenerating the thumbnails.

I suggested you reupload all images through wordpress media library rather than regenerating it.

Thanks

Hi paul,

I’ve added
add_filter( ‘jpeg_quality’, create_function( ‘’, ‘return 100;’ ) );
to the functions.php of the child theme and uploaded the images once again. They still got compressed and another background. Could you explain this please?

Hi,

Try to overwrite all images you have uploaded using FTP.

Login to FTP(Filezilla) and navigate to wp-content/uploads/2017/12 then overwrite the images with the original.

Hope that helps.

Hi,

I’ve tried this and it also did’nt worked. I’ve also installed a plugin called “Disable Image Compression” - also no better images. Wordpress still "compresses the original 113kb picture with #fff bg to a picture with #fefefe bg, smaller resolution but higher size of the jpg file…

Hi,

Can you provide us your http login so we can take a closer look.

Hi Paul,

I’ve added it above. I can’t open a private post now :frowning: could you please look on my first/second post? Thank you!

I’ve tried it now with png - same problem. I don’t understand… If you need the login for the backend please tell me

Hi There,

I found the image you have uploaded for the product is loading fine without compression and It has white background.

I didn’t see any change in background after upload.

Thanks

Please check the picture once again. I see the stripes on this screenshot, too.

Hi,

It looks like you have removed all your images.

As stated previously, please note that this is more of a wordpress issue rather than the theme.

You can try activating worpress default twenty seventeen theme and check your images.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.