#How to import image from CMS
1 messages · Page 1 of 1 (latest)
Astro's built-in <Picture /> and <Image /> components are designed to optimize local images that are imported into your Astro files. However, for remote images like the ones from your CMS, these components will not process and optimize them.
In your case, the ogImageCMSurl is a remote image URL from your CMS, and hence it's not being optimized.
Astro does provide a way to optimize remote images, but it requires specific configuration in your project. Unfortunately, the provided knowledge sources do not contain information on how to configure Astro for remote image optimization.
For the <img> tag, you can use the full URL of the remote image as the src value. This will display the image but it will not be optimized.
<img src="<https://example.com/remote-cat.jpg"> alt="A sleeping cat.">