WP SMUSH PRO fail to smush the images in one of my websites up to google's standard

Hi WPMUDEV team

I have many websites run with the WP Smush Pro plugin to help my website get rid of the image size issue referring to google's image optimization standard. And in almost all of my websites work well. Thank to your great plugin !!.

But there is one website that after all the images were completely smushed, but some images still fail the Google Page Speed's image optimization standard. It is strange as I have never faced this issue before with using the WP Smush Pro with many of my other websites.

It is the homepage of http://www.reedthai.com

I have tried figured this issue but it seems I couldn't find the solution. Please kindly guide me.

PS) I have tried:
- clicked "RE-CHECK IMAGES"
- Included all image sizes to be optimized
- Resize original images

  • Nithin

    Hi Methee,

    Hope you are doing good today. :slight_smile:

    I checked your website in Google Page Speed, and the images are marked as compressing, and resizing.

    Which means that the images are larger than the content width of your theme. That is, if you check the above screenshot, the image actual size is 200px X 258px, but if you look at the highlighted image the actual size required for your theme is 80px X 103px.

    Easiest would be to resize the image using Smush, however in this use case because of your theme, you'll have to register new image size for all such themes. You can check the details on how to register images here:
    https://developer.wordpress.org/reference/functions/add_image_size/

    Once you register, you'll have to re-smush these new images, so that they gets optimized. You can add the following code in your themes functions.php file, and then check whether it works fine after smushing.

    add_action( 'init',  'wpmudev_register_new_image_size'  );
    	function wpmudev_register_new_image_size() {
    		add_image_size( 'wpmudev-thumbnail-custom-one', 80, 103, true );
    	}

    The above code only registers for new image size for the images in the left sidebar, as shown in the above screenshot. If that works, you can do the same for other images, which is marked in Google page Speed as Compressing, and resizing.

    Would highly recommend that you make changes like editing functions.php using a Child theme, so that it won't be overwritten when you update your theme.

    Please let us know how that goes, have a nice day. :slight_smile:

    Best Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.