• Resolved Andreas Schneider

    (@cryptomilk)


    The plugin doesn’t work with images in a blog post written with the gutenberg editor. It doesn’t recognize the image block. So I’ve extended the script to also apply for <div class="wp-block-image"></div>.

    You might want to update your plugin to cover this case too …

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Fernando Tellado

    (@fernandot)

    It not its purpose to work with image blocks 🙂

    I’ve made a customization & now it works for image blocks, too.

    @fernandot, do you see any argument against this?

    In the file ‘lightbox-images-for-divi.php’, I’ve added block images (and for our special purpose NextCellent Gallery, too):

    <script type="text/javascript">(function($){$(document).ready(function(){jQuery('.entry-content div:not(.et_pb_gallery_image) > a, #main-content .wp-block-image > a, .ngg-gallery-thumbnail > a, .entry-content *:not(div) > a').children('img').parent('a').addClass(function(){return(($(this).attr("href").split("?",1)[0].match(/\.(jpeg|jpg|gif|png)$/) != null) ? "et_pb_lightbox_image" : "");});});})(jQuery)</script>

    • This reply was modified 4 years, 8 months ago by Ann.
    • This reply was modified 4 years, 8 months ago by Ann.
    Plugin Author Fernando Tellado

    (@fernandot)

    Great tweak @akg-free 🙂

    Thank you, @fernandot, this is easy, if we ignore future updates. 😉
    It would be really awesome if any preferred class could be entered easy in backend, like some plugins with other topics provide.

    Sadly I wouldn’t be able to code this.

    But no, I don’t come with this as EXPECTATION, just luxury comfy think aloud. This plugin already is a really very helpful one! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Doesn’t work with gutenberg image blocks’ is closed to new replies.