Lighbox does not show placeholder image from the shortcode #10713
Labels
enhancement
New feature or request
lightbox
shortcodes
issues related to shortcodes
upstream
Bug is in upstream library
Milestone
The image won't be shown in the modal when clicking.
I think this is a bad interaction because placeholder create data-uri image, this is not correctly handled by Lightbox in the way we configure it.
placeholder shortcode will create this
Our filter do take everything to set on the link of class lightbox and especially take the
src
to become thehref
quarto-cli/src/resources/filters/layout/lightbox.lua
Lines 105 to 106 in 6173a70
This does not play well with Lighbox which uses the
href
to select the type. Andhref
being a data uri is not ok. So it default to external type in lightbox https://github.com/biati-digital/glightbox/blob/b71340f54371169276d01f84adcfa443a917a621/src/js/core/slide-parser.js#L34-L67which leads to using an iframe and not an image, when creating the lighbox modal. This prevent the image to show.
I believe we should correctly make this placeholder interact with lightbox. We may need to patch glightbox for that or just wait for upstream to add the feature
(this is not a problem with
embed-resources
because images are encoded later in the process and the Lua filter already puthref
on the link using thesrc
being a filename with extension. Then Lightbox do the right think to find back the encoded part).The text was updated successfully, but these errors were encountered: