diff --git a/src/lib/rehype-wrap-img.js b/src/lib/rehype-wrap-img.js index 790bd78..0bb6d88 100644 --- a/src/lib/rehype-wrap-img.js +++ b/src/lib/rehype-wrap-img.js @@ -9,6 +9,9 @@ export default function rehypeZoomImages(options = { selector: 'img' }) { const wrapper = fromSelector('div.zoom ') const label = fromSelector('label') const checkbox = fromSelector('input[type="checkbox"]') + + node.properties.loading = "lazy" + label.children = [checkbox, node] wrapper.children = [label] parent.children[i] = wrapper