Browse Source

Add support for `lazySrc` for thumbs

pull/165/head
Jānis Skarnelis 3 years ago
parent
commit
7c9afc3c3f
  1. 2
      dist/fancybox.esm.js
  2. 2
      dist/fancybox.umd.js
  3. 6
      src/Fancybox/Fancybox.js

2
dist/fancybox.esm.js

File diff suppressed because one or more lines are too long

2
dist/fancybox.umd.js

File diff suppressed because one or more lines are too long

6
src/Fancybox/Fancybox.js

@ -329,8 +329,12 @@ class Fancybox extends Base {
// Get thumbnail image source
let thumb = slide.thumb;
if (!thumb && slide.$thumb) {
if (!thumb && $thumb) {
thumb = $thumb.currentSrc || $thumb.src;
if (!thumb && $thumb.dataset) {
thumb = $thumb.dataset.lazySrc || $thumb.dataset.src;
}
}
// Assume we have image, then use it as thumbnail

Loading…
Cancel
Save