瀏覽代碼

fix(gallery): don't lazy load media library or remote images

`class="lazyload"` was earlier removed but the `data-src` was not reverted to `src`.

Fixes gallery images not loading from `static/img/` or from remote URL.

Fix #1771
George Cushen 5 年之前
父節點
當前提交
47c58faf81
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      layouts/shortcodes/gallery.html

+ 1 - 1
layouts/shortcodes/gallery.html

@@ -47,7 +47,7 @@
   {{ end }}
   {{/* Don't lazy load image as cannot init image size from non-Hugo asset, resulting in inaccurate anchor scrolling & active link highlighting. */}}
   <a data-fancybox="gallery{{ with .album }}-{{.}}{{ end }}" {{ with .caption }}data-caption="{{.|markdownify|emojify|safeHTMLAttr}}"{{ end }} href="{{$.Scratch.Get "src"}}">
-    <img data-src="{{$.Scratch.Get "src"}}" alt="">
+    <img src="{{$.Scratch.Get "src"}}" alt="">
   </a>
   {{end}}
   {{else}}