mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-09-02 01:20:23 +08:00
Update components/image-with-basepath.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -4,7 +4,9 @@ import { getAssetUrl } from "@/lib/base-path"
|
||||
|
||||
export default function Image(props: React.ComponentProps<typeof NextImage>) {
|
||||
const src =
|
||||
typeof props.src === "string" && !props.src.startsWith("http")
|
||||
typeof props.src === "string" &&
|
||||
props.src.startsWith("/") &&
|
||||
!props.src.startsWith("//")
|
||||
? getAssetUrl(props.src)
|
||||
: props.src
|
||||
|
||||
|
||||
Reference in New Issue
Block a user