Hi, Is it possible to use a remote image in frontmatter?
config.ts:
import { defineCollection, z } from "astro:content";
const imagePosts = defineCollection({
schema: ({image}) => z.object({
title: z.string(),
date: z.date(),
image: z.object({
src: image(),
alt: z.string(),
}),
}),
})
export const collections = {imagePosts}
---
title: Fake title
date: 2024-02-01
image:
src: https://media.4-paws.org/9/c/9/7/9c97c38666efa11b79d94619cc1db56e8c43d430/Molly_006-2829x1886-2726x1886-1920x1328.jpg
alt: "Katie"
---
Hi from *Markdown*
Gettig this error
imagePosts → image.md frontmatter does not match collection schema.
Image https://media.4-paws.org/9/c/9/7/9c97c38666efa11b79d94619cc1db56e8c43d430/Molly_006-2829x1886-2726x1886-1920x1328.jpg does not exist. Is the path correct?