[Support request] Featured image show lazy and first image of post not lazy in generepress premium

Home Forums Support [Support request] Featured image show lazy and first image of post not lazy in generepress premium

Home Forums Support Featured image show lazy and first image of post not lazy in generepress premium

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • #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.

    #2277567
    Diogenes

    can you help me with this?

    #2277686
    Scott

    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:

    https://web.dev/lazy-loading-best-practices/

    #2277695
    David
    Staff
    Customer Support

    Hi 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 ?

    #2277975
    Diogenes

    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.

    #2278340
    David
    Staff
    Customer 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 soon

    #2278399
    Diogenes

    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.

    #2278923
    Tom
    Lead Developer
    Lead Developer

    Hi 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#L1799

    What happens if you deactivate all of the GPP modules? Any difference?

    #2279205
    Diogenes

    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.

    #2280968
    Tom
    Lead Developer
    Lead Developer

    Thanks for that! I’ve been able to replicate the bug and have logged it to be fixed in 2.2.0 🙂

    #2281756
    Diogenes

    I’m glad you managed to replicate it.
    I’m waiting for the patch.
    Greetings.

    #2350471
    Diogenes

    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.

    #2350895
    Ying
    Staff
    Customer Support

    Hi there,

    The bug will be fixed in GP Premium 2.2.0, we’re expecting to launch it in Oct.

    #2352367
    Diogenes

    Ok, thank you

    #2352724
    Ying
    Staff
    Customer Support

    You are welcome 🙂

Viewing 15 posts - 1 through 15 (of 25 total)
  • You must be logged in to reply to this topic.