miromannino / Justified-Gallery

Javascript library to help creating high quality justified galleries of images. Used by thousands of websites as well as the photography community 500px.
http://miromannino.github.io/Justified-Gallery/
MIT License
1.68k stars 299 forks source link

Using with Picture Tag #319

Open zsarnett opened 4 years ago

zsarnett commented 4 years ago

I am unable to get the imgSelector to work when using a picture tag for optimized images.

<div id="gallery">
      <a href="img">
        <picture>
          <source
            srcset="img.webp"
            type="image/webp"
          />
          <source
            srcset="img.jpg"
            type="image/jpeg"
          />
          <img
            src="img.jpg"
          />
        </picture>
      </a>
</div>

imgSelector: "> a > picture > img, > a > picture > source, > a > picture >"

Tried with an with out the > a