- This topic has 33 replies, 4 voices, and was last updated 3 years ago by David.
-
AuthorPosts
-
April 10, 2021 at 3:46 am #1728471metcomllc@aol.com
On most of my pages I have issues related top grid-container that is causing them to fail CLS
For example https://www.tryhypnosisnow.com/become-emotionally-available/
<div id="page" class="site grid-container container hfeed grid-parent">
April 10, 2021 at 4:24 am #1728508DavidStaffCustomer SupportHi there,
The problem looks related to how the Cache / Optimization plugin is optimising the CSS and lazy loading the images.
Can you first disable your cache/optimization plugin and then retest the page to check this.
April 10, 2021 at 6:47 am #1728608metcomllc@aol.comI am working on above the fold CSS. Is there a way (add html code) to lazy load my mobile header https://www.tryhypnosisnow.com/wp-content/uploads/2021/03/cropped-hypnosis-NYC-Hypnotherapy-New-York-City-hypnotist.jpg?
April 10, 2021 at 7:05 am #1728861DavidStaffCustomer SupportPersonally i wouldn’t recommend lazy loading anything above the fold …. you want that content to be loaded before anything else
April 10, 2021 at 7:17 am #1728875metcomllc@aol.comI just realized that this header is for my desktop https://www.tryhypnosisnow.com/wp-content/uploads/2021/03/cropped-hypnosis-NYC-Hypnotherapy-New-York-City-hypnotist.jpg, not my mobile (I have different headers for desktop and mobile) but for some reason Google Page Insights is flagging this image “Defer offscreen images” on mobile only even though it is not being used on mobile. Any suggestions?
April 11, 2021 at 9:11 am #1730058TomLead DeveloperLead DeveloperHi there,
I’m seeing 0.03 CLS on your mobile site right now, and it’s not referencing that image. Did you get this resolved?
April 11, 2021 at 9:20 am #1730073metcomllc@aol.comMy desktop CLS has been fixed but my “mobile” Core Web Vitals (Largest Contentful Paint
and Total Blocking time) still need work. I appreciate whatever assistance you can provide.April 11, 2021 at 3:41 pm #1730307DavidStaffCustomer SupportThe LCP time is high because the first image in your content – which is the LCP element is being Lazy Loaded. If you check the PSI report and look at the film strip it provides you will see the image is not there on the first frame – disable the lazy loader on that image. Most lazy loaders allow you to use a CSS class to exclude them.
April 11, 2021 at 4:15 pm #1730317metcomllc@aol.comThank you for your response. I am not a developer. I use A3 lazy load and the exclusion class is
skip-lazy
. Do I add that to my HTML code to the image block in WordPress?April 11, 2021 at 6:53 pm #1730389ElvinStaffCustomer SupportHi there,
Image blocks have
Additional CSS class(es)
field like this: https://share.getcloudapp.com/7KuPL9rBYou can put the exclusion class on this field.
April 12, 2021 at 6:56 am #1731269metcomllc@aol.comThank you. I added additional CSS class and disable the WP lazy load feature but I still have the same issue with this page https://www.tryhypnosisnow.com/become-emotionally-available/ on “mobile”.
April 13, 2021 at 1:32 am #1732142DavidStaffCustomer SupportUnfortunately the method Elvin provided doesn’t work.
When using an Image Block WP outputs the image inside another element and the Additional CSS Class gets added to that and not the<img>
html where it is required.To fix that you would select the Image Block, and from the Blocks Toolbar 3 dot menu select Edit as HTML
You will see something like this:
<figure class="wp-block-image size-large"><img src="http://testsite.local/wp-content/uploads/2021/03/iamge_name.jpg" alt="" class="wp-image-6"/></figure>
That code needs to be edited where you see the classes field eg.
class="wp-image-6"
Within that add a space after whatever classes are in there and include the skip-lazy class. In my example that would be:class="wp-image-6 skip-lazy"
Once added you can use the 3dot menu to change to Edit Visually.
April 13, 2021 at 3:47 am #1732279metcomllc@aol.comThank you. When inspecting the element/image now
<img src="https://www.tryhypnosisnow.com/wp-content/uploads/2019/12/Become-Emotional…" alt="Hypnosis to Become Emotionally Available NYC" class="wp-image-4562 skip-lazy" width="382" height="393">
however the “MOBILE” Cumulative Layout Shift
and Total Blocking time still fail.April 13, 2021 at 4:34 am #1732322DavidStaffCustomer SupportThe Blocking time looks fine on the test i just ran.
The logo is the issue – its not a standard layout which is allowing for reflow…. should the mobile logo always be displayed above the Search and Hamburger icon ?April 13, 2021 at 5:07 am #1732364metcomllc@aol.comAre you asking if this
https://www.tryhypnosisnow.com/wp-content/uploads/2020/04/hypnosis-nyc-hypnotherapy-New-York-City.jpg
logo should always be visible? Yes
Above the search? Yes
What is a Hamburger icon?What are my options to address this?
-
AuthorPosts
- You must be logged in to reply to this topic.