Skip to content

Commit b54a104

Browse files
author
lfyfly
committed
add: gulp webp ignore .svg .gif file
1 parent 5ef3a03 commit b54a104

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ gulp.task('webphtml', function () {
5858
$('img[src]:not(.not-webp)').each(function () {
5959
var imgEl = $(this)
6060
var src = imgEl.attr('src')
61-
if(/^http/.test(src)) return
61+
if (/^http|\.(gif|svg)$/.test(src)) return
6262
imgEl.css('visibility','hidden')
6363
imgEl.removeAttr('src')
6464
imgEl.attr('data-src', src)

0 commit comments

Comments
 (0)