diff --git a/scripts/cloudinary.js b/scripts/cloudinary.js
index 2098938..a369816 100644
--- a/scripts/cloudinary.js
+++ b/scripts/cloudinary.js
@@ -15,7 +15,7 @@ hexo.extend.tag.register('cloudinary', (args) => {
let modern = ''
let legacy = ''
const cloudinary = 'https://res.cloudinary.com/' + user +
- '/image/upload/f_auto,q_auto/c_limit,'
+ '/image/upload/f_auto,q_auto'
if (fileName.endsWith('.png')) {
modern = fileName.replace(/\.png$/, '.webp')
@@ -23,57 +23,38 @@ hexo.extend.tag.register('cloudinary', (args) => {
} else if (fileName.endsWith('.webp')) {
modern = fileName
legacy = fileName.replace(/\.webp$/, '.gif')
+ } else {
+ legacy = fileName
}
+ const img = `
+ src="${cloudinary}w_768/${legacy}"
+ alt="${alt}">`
+
if (fileName.endsWith('.png') || fileName.endsWith('.webp')) {
return `
`
} else {
return `
-
- `
+ ${img}`
}
})