इसे छोड़कर कंटेंट पर जाएं
This is an unmaintained snapshot of the Astro v4 docs. View the latest docs.

Expected src to be an image.

यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।

ExpectedImage: Expected src property for getImage or <Image /> to be either an ESM imported image or a string with the path of a remote image. Received SRC (type: TYPEOF_OPTIONS).

Full serialized options received: FULL_OPTIONS.

An image’s src property is not valid. The Image component requires the src attribute to be either an image that has been ESM imported or a string. This is also true for the first parameter of getImage().

---
import { Image } from "astro:assets";
import myImage from "../assets/my_image.png";
---
<Image src={myImage} alt="..." />
<Image src="https://example.com/logo.png" width={300} height={300} alt="..." />

In most cases, this error happens when the value passed to src is undefined.

See Also:

योगदान करें

आपके दिमाग में क्या है?

समुदाय