diff --git a/src/components/common/Image.astro b/src/components/common/Image.astro index 52fc1cd..80dab3f 100644 --- a/src/components/common/Image.astro +++ b/src/components/common/Image.astro @@ -41,12 +41,15 @@ const _image = await findImage(props.src); let image: ImageType | undefined = undefined; -if ( - typeof _image === 'string' && - (_image.startsWith('http://') || _image.startsWith('https://')) && - isUnpicCompatible(_image) -) { - image = await getImagesOptimized(_image, props, unpicOptimizer); +if (typeof _image === 'string') { + if ((_image.startsWith('http://') || _image.startsWith('https://')) && isUnpicCompatible(_image)) { + image = await getImagesOptimized(_image, props, unpicOptimizer); + } else { + image = { + src: _image, + attributes: { ...props, src: undefined }, + }; + } } else if (_image) { image = await getImagesOptimized(_image, props, astroAsseetsOptimizer); }