diff --git a/src/components/ui/markdown/renderers/image.tsx b/src/components/ui/markdown/renderers/image.tsx index ae9a6836ac..f03d7a0eaa 100644 --- a/src/components/ui/markdown/renderers/image.tsx +++ b/src/components/ui/markdown/renderers/image.tsx @@ -70,7 +70,7 @@ export const GridMarkdownImages: FC<{ const GridZoomImage: FC<{ src: string }> = memo(({ src }) => { const { accent, height, width } = useMarkdownImageRecord(src) || {} - const cropUrl = addImageUrlResizeQuery(src, 300) + const cropUrl = addImageUrlResizeQuery(src, 600) const imageEl = useRef(null) const wGreaterThanH = width && height ? width > height : true diff --git a/src/lib/image.ts b/src/lib/image.ts index 7be58aad1d..093b718794 100644 --- a/src/lib/image.ts +++ b/src/lib/image.ts @@ -46,11 +46,11 @@ export const addImageUrlCropSizeQuery = (url: string, size: number) => { // Tencent Cloud 数据万象 // ?imageMogr2/thumbnail/300x/crop/300x300/gravity/center parsedUrl.searchParams.set( - `imageMogr2/thumbnail/${size}x/crop/${size}x${size}/gravity/center`, + `imageMogr2/thumbnail/${size}x/crop/${size}x${size}/gravity/center/strip`, '', ) - return parsedUrl.toString() + return parsedUrl.toString().replace(/=$/, '') } export const addImageUrlResizeQuery = (url: string, size: number) => { @@ -58,7 +58,7 @@ export const addImageUrlResizeQuery = (url: string, size: number) => { // Tencent Cloud 数据万象 // ?imageMogr2/thumbnail/300x - parsedUrl.searchParams.set(`imageMogr2/thumbnail/${size}x`, '') + parsedUrl.searchParams.set(`imageMogr2/thumbnail/${size}x/strip`, '') - return parsedUrl.toString() + return parsedUrl.toString().replace(/=$/, '') }