diff --git a/src/content/docs/en/recipes/dynamically-importing-images.mdx b/src/content/docs/en/recipes/dynamically-importing-images.mdx index c08d179f8fef3..62e8238e462e9 100644 --- a/src/content/docs/en/recipes/dynamically-importing-images.mdx +++ b/src/content/docs/en/recipes/dynamically-importing-images.mdx @@ -68,7 +68,7 @@ In this recipe, you will learn how to dynamically import your images using Vite' } const { imagePath, altText, name, age } = Astro.props; - const images = import.meta.glob<{ default: ImageMetadata }>('/src/assets/*.{jpeg,jpg,png,gif}') + const images = import.meta.glob<{ default: ImageMetadata }>('/src/assets/*.{jpeg,jpg,png,gif,JPEG,JPG,PNG,GIF}') --- ``` @@ -88,7 +88,7 @@ In this recipe, you will learn how to dynamically import your images using Vite' } const { imagePath, altText, name, age } = Astro.props; - const images = import.meta.glob<{ default: ImageMetadata }>('/src/assets/*.{jpeg,jpg,png,gif}'); + const images = import.meta.glob<{ default: ImageMetadata }>('/src/assets/*.{jpeg,jpg,png,gif,JPEG,JPG,PNG,GIF}'); ---

{name}

@@ -115,8 +115,8 @@ In this recipe, you will learn how to dynamically import your images using Vite' } const { imagePath, altText, name, age } = Astro.props; - const images = import.meta.glob<{ default: ImageMetadata }>('/src/assets/*.{jpeg,jpg,png,gif}'); - if (!images[imagePath]) throw new Error(`"${imagePath}" does not exist in glob: "src/assets/*.{jpeg,jpg,png,gif}"`); + const images = import.meta.glob<{ default: ImageMetadata }>('/src/assets/*.{jpeg,jpg,png,gif,JPEG,JPG,PNG,GIF}'); + if (!images[imagePath]) throw new Error(`"${imagePath}" does not exist in glob: "src/assets/*.{jpeg,jpg,png,gif,JPEG,JPG,PNG,GIF}"`); ---

{name}