fix: home images

This commit is contained in:
DIYgod
2023-04-06 00:52:09 +01:00
parent e00be336bd
commit 3d4cb2d264
5 changed files with 19 additions and 7 deletions
+6 -4
View File
@@ -19,10 +19,12 @@ export const Image: React.FC<
const autoSize = !width && !height && !fill
const noOptimization = className?.includes("no-optimization")
try {
new URL(src)
} catch (error) {
return null
if (!src.startsWith("/assets/")) {
try {
new URL(src)
} catch (error) {
return null
}
}
return noOptimization ? (