fix(cloudinary): Statically not support animated webp

This commit is contained in:
curben 2019-08-30 07:24:07 +01:00
parent bde71fd644
commit 503584a543
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
1 changed files with 4 additions and 1 deletions

View File

@ -20,7 +20,10 @@ hexo.extend.tag.register('cloudinary', (args) => {
modern = fileName.replace(/\.png$/, '.webp') modern = fileName.replace(/\.png$/, '.webp')
legacy = fileName legacy = fileName
} else if (fileName.endsWith('.webp')) { } else if (fileName.endsWith('.webp')) {
modern = fileName // Statically doesn't support animated webp
// https://github.com/marsble/statically/issues/36
// modern = fileName
modern = fileName.replace(/\.webp$/, '.gif')
legacy = fileName.replace(/\.webp$/, '.gif') legacy = fileName.replace(/\.webp$/, '.gif')
} else { } else {
legacy = fileName legacy = fileName