- This topic has 24 replies, 5 voices, and was last updated 1 year, 1 month ago by David.
July 8, 2022 at 8:22 am #2277301Diogenes
Does generatepress premium have any function to remove the lazy load from the first image of the post? Or wordpress added this function recently?
I ask because of the following:
When I have the basic generatepress theme (without generatepress premium), the first image (featured) is not shown lazy and the other images of the post are shown lazy.
When I enable generatepress premium, the featured image is displayed lazy and the first image of the post is not displayed lazy (other images within the post are displayed lazy).
This behavior is strange, and I consider that the featured image is not displayed lazy and the others are, it is appropriate and desired.
Is there an error in generatepress premium? Or is this behavior normal and expected?
I leave you the link of the page where I have done these tests, this one has only generatepress premium enabled, without any other plugin, without any cache plugin, without code added to functions.php or elements.
I would appreciate the help.July 8, 2022 at 7:42 pm #2277567Diogenes
can you help me with this?July 9, 2022 at 2:09 am #2277686Scott
If your first image is within the viewport above the “fold” it will be loaded with the tags as normal. This is pretty common and expected behavior. PageSpeed Insights, GT Metrix and most other performance metric tools will specifically tell you it isn’t good to lazy load above the fold.
And yes WordPress has a built in lazy load “feature”.
Here’s a good reference resource:July 9, 2022 at 2:26 am #2277695DavidStaffCustomer Support
thats odd, as unless you have enabled a different featured image location with GP Premium then the markup and presumably the Above the Fold position of the image is the same as it is in the free theme.
Neither the Theme or GP Premium adds any code to change that.
Is it possible to see the site with GP Premium disabled ?July 9, 2022 at 7:55 am #2277975Diogenes
Hi David, thanks for replying.
I already disabled gp premium so you can see it.
In the image below you can see how the featured image is configured in gp premium, there is no additional code in it.
This happens on all my websites with gp premium.
If you wish, I can give you access as an administrator to that wordpress if you want to go deeper. It is a test website nothing more.July 10, 2022 at 2:45 am #2278340DavidStaffCustomer Support
Thanks for reporting this, we’ll do some testing and see whats going on there.
Could be a bug, or recent change in WP that we haven’t picked up.
If you could provide a temporary admin login – it would be much appreciated
Get back to you soonJuly 10, 2022 at 4:47 am #2278399Diogenes
I leave you the access data in the private information of this replica.
I would appreciate if you tell me if it was a bug or something I’m doing wrong.July 10, 2022 at 8:50 pm #2278923TomLead DeveloperLead Developer
I can’t think of anything in GP Premium that would do this.
I actually dug into WP core when I built the Image block in GenerateBlocks to see how they add the lazy loading attributes.
You can see here they look for the
wp-image-xxclass, which your image has: https://github.com/WordPress/wordpress-develop/blob/5650aa623c60ba224130b7820d38f1e69d583bce/src/wp-includes/media.php#L1799
What happens if you deactivate all of the GPP modules? Any difference?July 11, 2022 at 4:09 am #2279205Diogenes
If I disable all the premium GP modules it works correctly (featured image without lazy and first image lazy), the problem seems to be in the GPP Blog module.
If I activate it, the featured image makes it lazy and the first image of the post without lazy.
In fact, create a new wordpress from scratch without installing or changing anything from the default installation (no plugins, themes or code). In it I only put: generatepress theme, generatepress child theme, GP premium, activate only the Blog module and the same thing happens.
I leave you in the Private Information of this replica the access data as administrator to this new website, as well as the example post where I put the images. It is a test website so you can make the changes you need in it.
I appreciate the help given.July 12, 2022 at 2:17 pm #2280968TomLead DeveloperLead Developer
Thanks for that! I’ve been able to replicate the bug and have logged it to be fixed in 2.2.0 🙂July 13, 2022 at 7:53 am #2281756Diogenes
I’m glad you managed to replicate it.
I’m waiting for the patch.
Greetings.September 22, 2022 at 4:49 am #2350471Diogenes
I revive this post to ask what happened to the update to patch this bug?
It’s been over two months and it still hasn’t been fixed.
Thanks.September 22, 2022 at 10:22 am #2350895YingStaffCustomer Support
The bug will be fixed in GP Premium 2.2.0, we’re expecting to launch it in Oct.September 24, 2022 at 6:46 am #2352367Diogenes
Ok, thank youSeptember 24, 2022 at 12:22 pm #2352724YingStaffCustomer Support
You are welcome 🙂
- You must be logged in to reply to this topic.