refactor: migrate to webp

This commit is contained in:
Stephen Zhou 2024-09-20 14:05:31 +08:00
parent 0745ac07dd
commit 973553b0e9
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ export const getImageProxyUrl = ({
url: string
width: number
height: number
}) => `${env.VITE_IMGPROXY_URL}/unsafe/fit-in/${width}x${height}/${encodeURIComponent(url)}`
}) => `${env.VITE_IMGPROXY_URL}?url=${encodeURIComponent(url)}&width=${width}&height=${height}`
export const replaceImgUrlIfNeed = (url: string) => {
for (const rule of imageRefererMatches) {