[WP Smush Pro] Problems with image sizes regardles of Smush CDN

Hi.
Google speed insights is saying I am having issues with image sizes, But shouldn't that be fixed with the Smush CDN soloution? Or am I missing something?
Access is granted.

Regards,
Ralph

  • Ash
    • WordPress Hacker

    Hello Ralph

    Smush doesn't fix the incorrect sized images, but it can show you those images in the front end. I can see you have "Detect and show incorrectly sized images" enabled in the Smush settings. So, when you are logged in as administrator, and visit the front end you can see a yellow border around the images which are too large or small than its container. For example, here is a screenshot from your site:

    You can see there, the marked image container size is 453x302px but the loaded image size is 2048x1365px. So you can reduce the image size using photoshop or any other photo editing tool and re-set there, then it should be okay.

    Let us know how it goes. Have a nice day!

    Cheers,
    Ash

  • Ralph
    • Flash Drive

    Hi Ash.

    I am aware of this. But using the CDN function, shouldn't the CDN remove the need to resize these?
    I thought the CDN served the proper sized image automatically? It seems to to so on my other sites.

    Or have I missed something here?

    Ralph

  • Nithin
    • Support Wizard

    Hi Ralph,

    Yes, once Automatic Resizing option is enabled in Smush CDN, it should help with making sure the images are automatically resized based on srcset tag that the browser can choose from.

    It won't bring any difference in the images listed in the "Detect and show incorrectly sized images" section. However, enabling Smush CDN should have listed all the images listed in Google Page Speed as optimized.

    Seems like the support access to your website is no longer enabled, could you please grant support staff access so that we could give a closer look. You can grant access from WPMU DEV > Support > Support Access > Grant Access, or check this manual: https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    Please let us know once you enable access, so that we could get this sorted. Have a nice weekend. :slight_smile:

    Kind Regards,
    Nithin

    • Nithin
      • Support Wizard

      Hi Ralph,

      Hope you are doing good today. :slight_smile:

      Sorry for the delay in getting back to you. I checked your website and could notice the settings are correct and intact. On giving a closer look at Google Page Speed, I could notice 7 images listed under "Properly Size Images".

      I brought this into the developer's attention, and this seems more specific with the strict Google Page Test resulting in their new API changes.

      What Automatic resize feature in Smush CDN does is it adds proper scrset, and sizes attributes to make sure the images are loaded for various devices, and screen sizes. Unfortunately, this isn't enough with the new API changes at the moment, and there would be some instances where the images would be listed as not resized, and the listed images would have to be either manually, or dynamically resized according to the content width.

      Making sure the images are loading according to the content width of the theme is something which should be supported out of the box in the theme side, but that isn't the case at the moment for these images, and the image is larger than the content width at the moment.

      I could notice the images loaded in the homepage seems to be added dynamically, so manual resize won't help much, as image size needs to be registered within the theme side.

      Please try the following code, and see whether it helps:

      <?php
      add_action( 'init',  'wpmudev_register_new_image_size'  );
      	function wpmudev_register_new_image_size() {
      		add_image_size( 'wpmudev-thumbnail-custom-one', 495, 331, true );
      	}

      You can add the code as a mu-plugins as mentioned in this manual:
      https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

      Once done, his should add a new checkbox in the Automatic Smush section, under Smush Pro > Bulk Smush. Once the option is checked, and bulk smush is performed.

      The new images sizes would get generated according to the content width which was missed for the listed images in Google Page Speed.

      Please do let us know how that goes so that we could give a closer look if needed. Have a nice day ahead. :slight_smile:

      Regards,
      Nithin

    • Nithin
      • Support Wizard

      Hi Bryan,

      I seem to be having a similar problem where any jpg file is getting served from the CDN, but the png files are being served from my server

      It should have worked out of the box, I could notice the logo is not serving via CDN. I'm afraid, this needs to be given a closer look so that we could have a better idea what's causing this.

      Since it's a different issue than the current issue raised in the initial thread by the ticket author, it would be better to check your issue separately, could you please open a Live Chat regarding this with us, so that we could give a closer look, and help get this sorted asap.

      Please use the following link to open a chat:
      https://premium.wpmudev.org/hub/support/#get-support

      Regards,
      Nithin

  • Nithin
    • Support Wizard

    Hi Ralph,

    It took a while before I got a chance to try this. Sorry about the delay.
    But after having done what you said, the problem still persists.
    I added the file in the mu-plugins folder in the /wp-content directory.

    Sorry for the delay in getting back to you. The given code should have worked, however, I checked the Google Page Speed Test, and could notice 2 images which need to be resized.

    Could you please send us your websites credentials, so that we could give a closer look?

    You can send credentials by using our secure contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    - To Mark to my attention, the subject line should contain only: ATTN: Nithin Ramdas
    -WordPress admin username
    -WordPress admin password
    -login URL
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant URLs

    Please do follow up in the ticket once you have sent the above credentials. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

    • Ralph
      • Flash Drive

      Hi Nithin.
      Thanks for your reply. The Non-Profit we are helping here, has suddenly recieved the funds for a proper upgrade of the site. So trouble-shooting this will now be a waste of time for both You and us.

      So I will mark this as resolved and concentrete on the new site.
      Thanks again for your patient and motivated help :slight_smile:

      Ralph :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.