It not its purpose to work with image blocks 🙂
Ann
(@akg-free)
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.
Ann
(@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! 🙂