Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi

    WordPress by default compresses the jpeg images on uploading, and this is done to improve the site performance and enhance the speed.

    But you can alter it.

    Add the following code in the bottom of your theme’s functions.php file

    function se_jpeg_quality_callback() {
     return (int)100;
    }
    
    add_filter( 'jpeg_quality', 'se_jpeg_quality_callback' );

    To know more about this, read this blog.

    Hope it helps!!

    Thanks

    Actually the blurriness is not from WP jpeg compression.

    In this particular case, the OP’s site, the blurriness is from browser resize (scale) the actual image to fit in the content width. The browser resize doesn’t do anything to the actual image, it just resize visually or (scale down) as in CSS width and height to fit the big image into available content width.

    For example, the “spinach dip” which is the first image in that post linked to in OP is 2,448px × 2,448px and browser scaled it down to 640px × 640px, notice the numbers there, it’s way too much for the scaled down to look close to original. Modern browsers do a pretty good job in resizing image to fit in content width, but the 2,448px to 640px is way too much.

    To fix this, when doing the “insert into post” choose Medium or Large, do not choose Full size if your uploaded image is way too big in dimension.
    https://codex.wordpress.org/Inserting_Images_into_Posts_and_Pages

    Professional web designer/ or pro bloggers shouldn’t upload big dimension image to WP, it’s a waste of space and also bandwidth. WP is not to be used as image storage, it’s for presentation of content. So optimize the image before upload into WP. By optimization, do both the dimensions (width/height) and file size, most image editing software have this function, it can be done in bulk. In general web usage, use 960px or 1200px in width.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Blurry images’ is closed to new replies.