diff --git a/scripts/cloudinary.js b/scripts/cloudinary.js index 1562d6a..b0de0b9 100644 --- a/scripts/cloudinary.js +++ b/scripts/cloudinary.js @@ -14,9 +14,7 @@ hexo.extend.tag.register('cloudinary', (args) => { const alt = args[1] || '' let modern = '' let legacy = '' - const cloudinary = 'https://cdn.statically.io/img/res.cloudinary.com/' + user + - '/image/upload/q_auto' - const original = 'https://cdn.statically.io/img/res.cloudinary.com/' + user + '/' + fileName + const link = 'https://cdn.statically.io/img/res.cloudinary.com/' + user if (fileName.endsWith('.png')) { modern = fileName.replace(/\.png$/, '.webp') @@ -28,26 +26,30 @@ hexo.extend.tag.register('cloudinary', (args) => { legacy = fileName } + fileName += '?auto_format=false' + modern += '?auto_format=false' + legacy += '?auto_format=false' + const img = `${alt}` if (fileName.endsWith('.png') || fileName.endsWith('.webp')) { - return ` + return `