1
1
Starlight 0.39 (astro.build)
2
2
Astro 6.2 released (astro.build)

Astro 6.2 introduces an experimental custom logger with JSON output, an SVG optimizer API, a new font file URL helper, and more.

3
1
4
4
5
3
submitted 1 month ago by nemeski@mander.xyz to c/astro@programming.dev
6
2
Astro 6.1 is here (astro.build)
submitted 1 month ago by nemeski@mander.xyz to c/astro@programming.dev
7
5
Astro 6.0 is here (astro.build)
submitted 1 month ago by nemeski@mander.xyz to c/astro@programming.dev
8
2
submitted 2 months ago by nemeski@mander.xyz to c/astro@programming.dev
9
2

So i try to make a Gallery with Astro and i hope someone can help me to grasp a few things.

I have a folder called "assets" in "src" in which all the images reside.

I also have a .astro file in "pages".
In this file i try to get the images with:

const images = import.meta.glob('/src/assets/*.{jpeg,jpg,png,gif}')  
const resolvedImages = Object.entries(images)  

in the body of the .astro i try to map "resolvedImages"

{resolvedImages.map((image) => (  
	<Image src={image[0]} alt="blabla" />  
))}  

Which kinda works but feels wrong. That i have to write "image[0]" instead of "image.src" can't be the solution.

There seems to be something called "ImageMetadata " , which has all the things i would like to have access to (filepath, width, etc.). But i don`t understand how to use it.

When i try

const images = import.meta.glob<ImageMetadata>('/src/assets/*.{jpeg,jpg,png,gif}')  

I still can´t access the values. What am i not understanding?

Also, is that even the right approach? There is also the option to define a collection and get that but the docs say those are just for markdown?

Thanks in advance.

10
3
submitted 3 months ago by nemeski@mander.xyz to c/astro@programming.dev
11
3
Astro 5.17 released (astro.build)
submitted 3 months ago by nemeski@mander.xyz to c/astro@programming.dev
12
4
submitted 3 months ago by nemeski@mander.xyz to c/astro@programming.dev
13
4
Astro 6 Beta (astro.build)
submitted 3 months ago by nemeski@mander.xyz to c/astro@programming.dev
14
1
2025 year in review (astro.build)
submitted 3 months ago by nemeski@mander.xyz to c/astro@programming.dev
15
3
16
7
submitted 4 months ago by nemeski@mander.xyz to c/astro@programming.dev
17
2
submitted 5 months ago by nemeski@mander.xyz to c/astro@programming.dev
18
3
Astro 5.16 (astro.build)
submitted 5 months ago by nemeski@mander.xyz to c/astro@programming.dev
19
2
submitted 6 months ago by nemeski@mander.xyz to c/astro@programming.dev
20
5
Astro 5.15 (astro.build)
submitted 6 months ago by nemeski@mander.xyz to c/astro@programming.dev
21
4
Astro 5.14 (astro.build)
submitted 7 months ago by nemeski@mander.xyz to c/astro@programming.dev
22
3
submitted 8 months ago by nemeski@mander.xyz to c/astro@programming.dev
23
5
Astro 5.13 (astro.build)
submitted 8 months ago by nemeski@mander.xyz to c/astro@programming.dev
24
1
submitted 9 months ago by nemeski@mander.xyz to c/astro@programming.dev
25
4
Astro 5.12 (astro.build)
submitted 9 months ago by nemeski@mander.xyz to c/astro@programming.dev
view more: next ›

Astro

198 readers
1 users here now

founded 2 years ago
MODERATORS