소스 검색

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}}