图片url

This commit is contained in:
tangly1024.com
2024-04-30 10:05:48 +08:00
parent 3d678679cf
commit d69c525cea

View File

@@ -24,13 +24,15 @@ const mapImgUrl = (img, block, type = 'block', needCompress = true) => {
}
// Notion 图床转换为永久地址
const hasConverted = ret.indexOf('https://www.notion.so/image') === 0
const hasConverted =
ret.indexOf('https://www.notion.so/image') === 0 ||
ret.includes('notion.site/images/page-cover/')
// 需要转化的URL ; 识别aws图床地址或者bookmark类型的外链图片
const needConvert =
!hasConverted &&
(ret.indexOf('secure.notion-static.com') > 0 ||
ret.indexOf('prod-files-secure') > 0 ||
block.type === 'bookmark')
(block.type === 'bookmark' ||
ret.includes('secure.notion-static.com') ||
ret.includes('prod-files-secure'))
// 使用Notion图传
if (needConvert) {