1
1
Astro 7.0 (astro.build)
2
5
3
3
Astro 6.4 released (astro.build)
submitted 3 weeks ago by nemeski@mander.xyz to c/astro@programming.dev
4
1
Starlight 0.39 (astro.build)
submitted 1 month ago by nemeski@mander.xyz to c/astro@programming.dev
5
2
Astro 6.2 released (astro.build)
submitted 1 month ago by nemeski@mander.xyz to c/astro@programming.dev

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

6
1
7
4
8
3
submitted 2 months ago by nemeski@mander.xyz to c/astro@programming.dev
9
2
Astro 6.1 is here (astro.build)
submitted 2 months ago by nemeski@mander.xyz to c/astro@programming.dev
10
5
Astro 6.0 is here (astro.build)
submitted 3 months ago by nemeski@mander.xyz to c/astro@programming.dev
11
2
submitted 3 months ago by nemeski@mander.xyz to c/astro@programming.dev
12
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.

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

Astro

202 readers
1 users here now

founded 3 years ago
MODERATORS