Skip to content

Expected image options.

This content is not available in your language yet.

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:

Contribute

Czym chcesz się podzielić?

Create GitHub Issue

Quickest way to alert our team of a problem.

Community