Home › Forums › Support › Featured image show lazy and first image of post not lazy in generepress premium
- This topic has 24 replies, 5 voices, and was last updated 1 year, 1 month ago by
David.
-
AuthorPosts
-
July 8, 2022 at 8:22 am #2277301
Diogenes
Hello.
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.
[url=https://postimg.cc/Z0cV6Dj0][img]https://i.postimg.cc/Z0cV6Dj0/imagen-1.png[/img][/url]
[url=https://postimg.cc/v105cpGd][img]https://i.postimg.cc/v105cpGd/imagen-2.png[/img][/url]
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).
[url=https://postimg.cc/14X1n6rx][img]https://i.postimg.cc/14X1n6rx/imagen-3.png[/img][/url]
[url=https://postimg.cc/9wr665QX][img]https://i.postimg.cc/9wr665QX/imagen-4.png[/img][/url]
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 #2277695David
StaffCustomer SupportHi there,
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.
[img]http://imgfz.com/i/BaGXSYn.png[/img]
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 #2278340David
StaffCustomer SupportThanks 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 soon
July 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 #2278923Tom
Lead DeveloperLead DeveloperHi there,
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-xx
class, which your image has: https://github.com/WordPress/wordpress-develop/blob/5650aa623c60ba224130b7820d38f1e69d583bce/src/wp-includes/media.php#L1799What happens if you deactivate all of the GPP modules? Any difference?
July 11, 2022 at 4:09 am #2279205Diogenes
Hi tom.
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 #2280968Tom
Lead DeveloperLead DeveloperThanks 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
Hi.
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 #2350895Ying
StaffCustomer SupportHi there,
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 you
September 24, 2022 at 12:22 pm #2352724Ying
StaffCustomer SupportYou are welcome 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.