#How to import image from CMS

1 messages · Page 1 of 1 (latest)

atomic pelicanBOT
#

Hi @tame cobalt. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

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.">

For more detailed information on how to optimize remote images with Astro, you may want to refer to the official Astro documentation or community resources.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: