• Hi,
    I’ve just discovered one little flaw (probably intended?).

    When I try to use your lightbox for the images in SVG format, the lightbox isn’t triggered. From the code I’ve gathered that for the lightbox to be opened there should be data-width and data-height parameter, which isn’t present for SVGs. If I add them manually, the lightbox works fine.

    Could this be fixed or is it intended limitation?

    Sometimes I use it for galleries of logos etc, and they are mostly in SVG formats, sometimes even mixed, which causes that some of the logos are visible in lightbox gallery and some are not.

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    SVGs don’t need to have a fixed size, so it can’t be guaranteed that SVGs can be displayed poperly in a lightbox. Only if the SVG contains either a display width/height or a viewBox that could be used. However – PHP does not have a function which can be used for this – GD and ImageMagick work with bitmap graphics onyl. So I would need to create a parser for SVGs as well. Since SVGs are not that common in WordPress image collections, there was no need yet to do this, but I’ll see what I can do for future version.

Viewing 1 replies (of 1 total)
  • The topic ‘SVG images excluded from lightbox’ is closed to new replies.