diff --git a/routes/jike/common.js b/routes/jike/common.js index 0d90d0390..1c1135f7f 100644 --- a/routes/jike/common.js +++ b/routes/jike/common.js @@ -84,12 +84,28 @@ module.exports = { // 5. 图片 if (item.pictures) { - item.pictures.forEach( - (pic) => - (description += `
`; + } else { + // jpeg, bmp, png, gif, webp + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types + let type = 'jpeg'; + switch (pic.format) { + case 'bmp': + type = 'bmp'; + break; + case 'png': + type = 'png'; + break; + default: + break; + } + description += `
`) - ); + }" type="image/${type}">`; + } + }); } // rss标题