#SVG images are giving an error with astro image

3 messages · Page 1 of 1 (latest)

jaunty moss
#

In the docs an SVG is used too, but when you build...this happens(i have also added sharp)

Expected one of: heic, heif, avif, jpeg, jpg, jpe, tile, dz, png, raw, tiff, tif, webp, gif, jp2, jpx, j2k, j2c for format but received svg of type string

onyx copper
#

Hi there! In the Astro Docs, the example with a .svg image is just using the standard HTML<img> tag.

However, if you're using the @astrojs/image integration (e.g., using the <Image/> component), you should specify the output file format (not the source file format) of the optimized image, and .svg is not one of the supported output formats.

jaunty moss
#

aha