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

Expected image options.

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

ExpectedImageOptions: Expected getImage() parameter to be an object. Received OPTIONS.

getImage()’s first parameter should be an object with the different properties to apply to your image.

import { getImage } from "astro:assets";
import myImage from "../assets/my_image.png";
const optimizedImage = await getImage({src: myImage, width: 300, height: 300});

In most cases, this error happens because parameters were passed directly instead of inside an object.

See Also:

योगदान करें

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

समुदाय