Skip to content

Commit 1c503a3

Browse files
authored
Merge pull request #429 from BeAPI/fix/nolazyload-size
fix nolazyload tpl
2 parents 0f14042 + 176210e commit 1c503a3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<source srcset="%%img-100-100%%, %%img-200-200%% 2x" media="(max-width: 768px)" />
2+
<source srcset="%%img-200-200%%, %%img-400-400%% 2x" />

config/WebpackImageSizesPlugin.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ class WebpackImageSizesPlugin {
6868
*/
6969
function getTemplateFileNames() {
7070
return fs.readdirSync(that._tplFolder).filter((tpl) => {
71-
if (tpl !== 'default-picture.tpl' && tpl !== 'default-picture-caption.tpl') {
71+
if (
72+
tpl !== 'default-picture.tpl' &&
73+
tpl !== 'default-picture-caption.tpl' &&
74+
tpl !== 'default-picture-nolazyload.tpl' &&
75+
tpl !== 'default-picture-nolazyload-caption.tpl'
76+
) {
7277
return tpl
7378
}
7479
})

0 commit comments

Comments
 (0)