See how Frete cut frontend build time by 70%

Announcing Visual Copilot - Figma to production in half the time

Builder.io
Builder.io
Contact sales

See how Frete cut frontend build time by 70%

Announcing Visual Copilot - Figma to production in half the time

Retrieve and filter assets stored in your Builder Space. Use these operations to query media by type, folder, and other attributes to support content delivery and management workflows.

Assets refer to media content uploaded to Builder. For more details on assets, see Asset Library.

To get all assets from your Builder Space, use the following query.

Use the following query to sort your assets by a particular key, such as the asset's name.

To filter assets by media type (such as images, videos, or specific formats), use the type field. Note that this corresponds to the MIME type of the asset.

Common asset types:

image/jpeg: jpeg images

image/png: png images

image/svg+xml: svg images

image/gif: gif images

image/webp: webp images

video/mp4: mp4 videos

application/pdf: pdf documents

To filter assets by folder, use the folders field with the folder ID. Assets can belong to multiple folders, so folders is an array field.

You can combine multiple filters to get more specific results. For example, to get all SVG images from a specific folder:

$eq: equal

$ne: not equal

$in: in array

$nin: not in array

$exists: field exists

$regex: regular expression match

Example with multiple operators:

This query returns jpeg or png images that have "logo" in their name and belong to at least one folder.

Use the GraphQL Explorer to try out these queries with your own Space and Organization. Then, visit the Admin API GraphQL Schema for more details on how to modify your queries.

Was this article helpful?

Product

Visual CMS

Theme Studio for Shopify

Sign up

Login

Featured Integrations

React

Angular

Next.js

Gatsby

Get In Touch

Chat With Us

Twitter

Linkedin

Careers

© 2020 Builder.io, Inc.

Security

Privacy Policy

Terms of Service

Get the latest from Builder.io

By submitting, you agree to our Privacy Policy

  • Fusion

  • Publish

  • Product Updates

  • Figma to Code Guide

  • Headless CMS Guide

  • Headless Commerce Guide

  • Composable DXP Guide

Security

Privacy Policy

SaaS Terms

Trust Center

Cookie Preferences