- This topic has 28 replies, 5 voices, and was last updated 4 years, 6 months ago by
David.
-
AuthorPosts
-
October 13, 2021 at 3:44 am #1961934
Theodore
Alright. I use the WP Rocket option. I have enabled it.
October 13, 2021 at 4:07 am #1961950Fabien
Hi,
I have the same issue regarding width / height attribute.
I’ve tried what @Elvin is suggesting (GP Premium 2.1.0 beta and
removing > reuploading > re-applyingthe logo) but it doesn’t work. My logo is in SVG. Could it be the reason ?October 13, 2021 at 4:27 am #1961974David
StaffCustomer SupportHi Fabien,
if you can raise a new topic with a link to your site i can take a look at the issue.
October 13, 2021 at 4:38 am #1961986David
StaffCustomer SupportHi Theodore,
retesting the site now shows the LCP time is within the recommended guidelines – ie. it passes the test.
If you want you can exclude the first featured image from lazy loading which may improve it even more.
To do that – add this PHP Snippet:// Add first-featured-image ( or any class ) to featured image of latest post function skip_lazy_class_first_featured_image($attr) { global $wp_query; if ( 0 == $wp_query->current_post ) { $attr['class'] .= ' skip-lazy'; } return $attr; } add_filter('wp_get_attachment_image_attributes', 'skip_lazy_class_first_featured_image' );Then we can disable the WP native lazy loading as well by adding this PHP Snippet:
add_filter( 'wp_lazy_loading_enabled', '__return_false' );October 13, 2021 at 4:59 am #1962002Theodore
Thanks for this update. The content shift (such as shaking ) before the content is fully loaded. And that is why the is still happening. Please focus on the arrow in the image.
October 13, 2021 at 5:19 am #1962021David
StaffCustomer SupportYou’re looking at the Origin Summary – that date is collected over 28 days. It won’t update immediately. If you check the Lab Data you will see this:
https://www.screencast.com/t/DtA1eXQD
Overtime ie. 28 days you will see the Origin Summary will improve.
October 13, 2021 at 5:34 am #1962037Theodore
Thanks for this clarity. But the individual post cumulative layout shift causes errors on individual posts.
October 13, 2021 at 5:42 am #1962043David
StaffCustomer SupportDid you add the code i provided here:
https://generatepress.com/forums/topic/content-shifts-or-adjust-when-loads/page/2/#post-1961986
October 13, 2021 at 6:04 am #1962052Theodore
I was thinking if I could define ads height under the fold could help to fix this. Please, how do I set the height of the ad under fold for auto ads?
October 13, 2021 at 6:15 am #1962058David
StaffCustomer SupportWhen i tested your site the main CLS issue is the lazy loading featured on the Single Post. If you use the code i provided it will stop that image from lazy loading.
October 13, 2021 at 6:16 am #1962059Theodore
I have added the code and disable WP Rocket lazy load but this increase the LCP to 4.9s
October 13, 2021 at 6:20 am #1962060David
StaffCustomer SupportLeave the WP Rocket Lazy Load enabled.
The code i provided simply excludes the featured image from lazy loading.October 13, 2021 at 6:29 am #1962066Theodore
Ok. I have done that but the code probably affected the LCP… Now reading more than expected as it was before. I think if defining a fixed ADS SPACE for AUTO-ADS could help fix this. Is there a way to do this?
October 14, 2021 at 2:42 am #1963014David
StaffCustomer SupportIts really difficult to diagnose an issue when things keep changing.
I ran two tests this morning on:Front page
https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fgadgetswright.com%2FThe total scores are lower, but all core web dev metrics ie. FCP, LCP, CLS are within accepted values.
The only CLS on Load is from the Cookie Consent notice – which i don’t recall being there before. You can see it in both filmstrips in the test above.
Your overall score had dropped, the major issue there is the loading of the Advert scripts, you may want to look at deferring ad script loading.
Regarding auto inserted advert sizes, i am not sure how you would do that, you would need to inspect an Auto Advert in the browser developers tools to see if there is CSS Class on the advert container, with that you could add some CSS to give it a min height.
-
AuthorPosts
- You must be logged in to reply to this topic.