Fetch Media Assets

Hey there,

is it somehow possible to fetch media assets direct from the media library instead of having them linked to a specific document? It would also be helpful to filter the query based on tags, file name etc.

I couldn't find anything in your docs.

Thanks!

Hello @andreas.kratzel

Thanks for reaching out to us.

It won't be possible to query media assets from the Media library. You have to upload them to Prismic documents.

Thanks,
Priyanka

Hello @Priyanka

really? How come that's not possible.

So let's say I want to create a gallery with > 200 pictures, I'd have to upload each single image manually in a document instead of just uploading them once and fetch them directly?

Hello @andreas.kratzel

It’s true. It’s not currently possible. This is an open feature request, though, but not something currently on our Roadmap. If/when they have any updates on this or need more information, they will update you here.

Thanks,
Priyanka

I just want to add that nearly 2 years later, I'm echoing your sentiment of "pain." I know that the team is closer to having a media library that allows you to tag media items (assets), but I am unaware if that functionality also includes being able to query/fetch items from the media library using the client.

Hey Team,

We actually have an assets API beta that you can try out :slight_smile:

1 Like