Dear Support,
I am contacting you to seek for support.
I have built my website taking advantage of the mega menus and the option of having an inbuilt image. I then created sub menus with a dedicated image for each of them, which dynamically changes when moving the mouse across the submenus.
The mega menu expands if somebody moves the mouse on top of it, only then the submenus and related images are visible.
I have activated the lazyload (through my hosting, SG Optimizer) and I would expect that mega menus images were loaded with a lower priority. In other words, they should be loaded after the main product page image. Instead, when I analyze the water fall it appears that the menu images are loaded first and only after the the product page image is loaded. Please see the evidence here: https://snipboard.io/uFz9fr.jpg
Google is penalizing me because of high LCP. This because in all my product pages, the main image is loaded only after all submenus images are loaded.
When I contacted my hosting provider, through which I activate the lazy load, they informed me that there is an issue with the theme.
Problem 1:
The images are not being lazy-loaded because of the the custom way they have been added to the mega menu. The images are simply added via CSS and not inserted into the menus as a normal image. This makes it so even WordPress’s own lazyload functionality won’t work on those images, thus why the hosting (SG Optimizer) doesn’t lazyload the image.
This is an example:
.menu-item-45630 .nav-sublist-dropdown { background-image: url(https://www.muranoglassitaly.com/wp-content/uploads/2021/09/luxury-4.jpg);}
Could you please help me to add images to the megamenu in line with wordpress standard (no via css) so that they could be lazy loaded?
Problem 2:
I am not using the lazy load theme functionality, nevertheless it appears that the theme is adding a additional tag “et-lazy-loaded” to same images representing a duplicated lazy-load tags. Please look at the given URL as an example for relevant images with duplicated tag. Duplicating tag can cause issues in terms of lazy load.
Could you please help me to remove the duplicated tags injected by the theme as it appears to be a mistake?
Thanks in advance for your help.
F.