diff --git a/source/js/next-boot.js b/source/js/next-boot.js index 2ff30e7e91..48bda0db0a 100644 --- a/source/js/next-boot.js +++ b/source/js/next-boot.js @@ -80,7 +80,7 @@ NexT.boot.refresh = function() { * Need to add config option in Front-End at 'layout/_partials/head.swig' file. */ CONFIG.fancybox && NexT.utils.wrapImageWithFancyBox(); - CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img'); + CONFIG.mediumzoom && window.mediumZoom('.post-body :not(a) > img, .post-body > img'); CONFIG.lazyload && window.lozad('.post-body img').observe(); CONFIG.pangu && window.pangu.spacingPage(); diff --git a/source/js/utils.js b/source/js/utils.js index 4be726fa4c..f3af20ce5a 100644 --- a/source/js/utils.js +++ b/source/js/utils.js @@ -20,7 +20,7 @@ NexT.utils = { * Wrap images with fancybox. */ wrapImageWithFancyBox: function() { - document.querySelectorAll('.post-body :not(a) > img').forEach(element => { + document.querySelectorAll('.post-body :not(a) > img, .post-body > img').forEach(element => { var $image = $(element); var imageLink = $image.attr('data-src') || $image.attr('src'); var $imageWrapLink = $image.wrap(``).parent('a');