admin 管理员组

文章数量: 1086019

Example

I have AppImage.astro component as below

---
import { Image } from 'astro:assets';
---
<Image src=".jpg" alt="A bird." inferSize />

Now when i generate build i want to save images in build and serve images from there.

Edit

Answer

export default defineConfig({
    image: {
        remotePatterns: [{
            protocol: 'https',
            hostname: 'example', // your image source domain
          }],
    }
});

本文标签: How to save remote images to local build in astroJS when generate buildStack Overflow