Skip to content

Images invisible with Parvus 2.3.3 using data-srcset & empty cache #49

Closed
@adamjohnson

Description

@adamjohnson

Reduced test case

I created a reduced test case that showcases this behavior on CodePen:

Steps to reproduce the issue

Different Browsers produce different results.

Chrome & Edge:

  1. Open a new tab. Be sure your cache is disabled (Devtools > Network > Disable Cache).
    • Bug will not be visible on repeat visits / cached images.
  2. Visit the debug mode or full page view from above.
  3. Click an image to open the Lightbox.
  4. Click the "X" to close the image / Lightbox.
  5. Click the same image to open it again.

Safari:

  1. Open a new tab. Be sure your cache is disabled (Devtools > Network > Disable Cache).
    • Bug will not be visible on repeat visits / cached images.
  2. Visit the debug mode or full page view from above.
  3. Click an image to open the Lightbox.

Results

Chrome & Edge:

The image is invisible when you open it the second time.

Safari:

The image is invisible in the Lightbox upon first click / fresh cache. The image does show if you click to open it again.

It appears the image is indeed in the DOM when it's "invisible"; however, inline styles are setting the width and height to 0, which causes the image to be invisible.

Screenshot of Parvus in DevTools with width and height attributes set to zero

Expected results

The image(s) should display when you click to open it.

Environment

  1. OSX Ventura 13.4.1
  2. Chrome & Edge 114, Safari 16.5.1. Seems to work in Firefox!

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions