Skip to content

Image block: Delayed response when opening image in lightbox for the first time #51555

Closed

Description

@artemiomorales

Description

When opening an image in the lightbox, there is a delay before the UI responds.

Step-by-step reproduction instructions

Must be tested on a live (not local) environment.

  1. Ensure the Gutenberg Interactivity API experiments are enabled.
  2. Add an image to a post.
  3. Enable the lightbox for the images in Advanced > Behaviors under the block settings.
  4. Publish the post and click on the image.
  5. See that there is a delay before the lightbox animation takes effect.

Screenshots, screen recording, code snippet

lightbox-delay.mp4

Environment info

-Gutenberg 16.0.0, WP 6.2.2

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Activity

  1. added
    [Type] Bug
    [Block] Image
    [Feature] Interactivity API
    on Jun 15, 2023
  2. luisherranz commented on Jun 16, 2023

    @luisherranz
    Member

    Why is the delay happening? Is it because it waits until the image has been downloaded?

  3. artemiomorales commented on Jun 16, 2023

    @artemiomorales
    ContributorAuthor

    Why is the delay happening? Is it because it waits until the image has been downloaded?

    @luisherranz Yes, it's because it waits for the image to be downloaded.

  4. artemiomorales commented on Jun 16, 2023

    @artemiomorales
    ContributorAuthor

    Note: While we are considering overall lightbox animation improvements, we could include this suggestion as part of the same PR.

    I also wonder if you all considered a very slight zoom on hover so it’d anticipate the behavior.

  5. luisherranz commented on Jun 16, 2023

    @luisherranz
    Member

    Is it possible to use the original image first, then switch to the full version once it's downloaded?

  6. artemiomorales commented on Jun 19, 2023

    @artemiomorales
    ContributorAuthor

    @luisherranz Will give that a shot! I'll also look into preloading the image on hover, which could at least help on desktop.

  7. artemiomorales commented on Jun 26, 2023

    @artemiomorales
    ContributorAuthor

    This has been fixed in #51721

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Image[Feature] Interactivity API[Type] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions