• How do we get the proper images loading into srcset with this plugin? Here is the code to set the sizes I want in functions.php. Now I just need the srcset to swap. Any help is greatly appreciated. Your plugin is amazing. I just hope I can use it with a better srcset.

    add_theme_support('post-thumbnails');
    add_action('after_setup_theme','wpse_setup_theme');
    function wpse_setup_theme(){
    	add_image_size('g-iphone-320',		320,9999,true);
    	add_image_size('g-pc-335',		335,9999,true);
    	add_image_size('g-iphone-7-375',	375,9999,true);
    	add_image_size('g-10-xs-max-414',	414,9999,true);
    	add_image_size('g-iphone-480',		480,9999,true);
    	add_image_size('g-iphone-568',		568,9999,true);
    	add_image_size('g-iphone-640',		640,9999,true);
    	add_image_size('g-pc-670',		670,9999,true);
    	add_image_size('g-ipad-orig-p',		768,9999,true);
    	add_image_size('g-iphone-946',		946,9999,true);
    	add_image_size('g-iphone-960',		960,9999,true);
    	add_image_size('g-iphone-1136',		1136,9999,true);
    	add_image_size('g-iphone-1536',		1536,9999,false);
    	add_image_size('g-ipad-1668-10-5',	1668,9999,false);
    	add_image_size('g-ipad-2224-10-5',	2224,9999,false);
    }
    • This topic was modified 3 years, 9 months ago by a4jp.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor WP Rocket

    (@wp_rocket)

    Hi?@a4jpcom

    Alfonso from WP Rocket here.

    Browsers tend to use the image they have already downloaded (and stored in cache) instead of using a new one, so please repeat your test making sure you manually empty your browser cache

    then, test what happens if lazy load is removed and the srcset is applied directly on the img tag. does it work as expected in that case?

    Let me know the result of this, I am happy to help. ??

    Best Regards,

Viewing 1 replies (of 1 total)
  • The topic ‘How do we get the proper images loading? Srcset.’ is closed to new replies.