[Smush Pro] How to fix Wrong Image Sizes shown in Desktop or Large screen after WPMU DEV CDN Enabled


When we enable Smush Pro CDN we see the wrong image size in desktop view.

The browser shows image size (1024 * 768) (can see by right click save as to see the file name). The container is 1400 px wide so it should take a higher image size and use that instead.

If Smush Pro CDN is disabled the right image size is back again and the quality is then much better


Regarding the image sizes issue, your parent theme set the content width is 800, so you can fix it by adding this custom snipped code to your child’s theme functions.php file:

add_action( 'after_setup_theme', 'wpmudev_custom_content_width', 99 );

function wpmudev_custom_content_width(){
  $GLOBALS['content_width'] = 1400; // you can change this value with your website/theme container size

Read the full discussion here: https://premium.wpmudev.org/forums/topic/smush-pro-after-enabling-smush-cdn-wrong-image-sizes-are-used-in-desktop-viewport/

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *