2 min read

What is the URL for Images?

Rather than link to the images directly, you can use Directus to deliver images to your application with ease and security. Best of all, you can optimize images for web using the built in parameters.
What is the URL for Images?

Directus hosts images through it's media library. This can be locally on the server or an external provider. Rather than link to the images directly, you can use Directus to deliver images to your application with ease and security. Best of all, you can optimize images for web using the built in parameters.

The URL for images in Directus is https://<project-host>/assets/<image-id>. Then add any parameters to the end starting with a question mark (?) then seperate each parameter with an ampersand (&).

Directus has great documentation on how you can deliver images. Be sure to read them over.

Accessing Files | Directus Docs
REST and GraphQL API documentation for file access and management in Directus.

Here is an example:

https://directus.host.com/assets/12bcdd34-e5e6-789e-0db1-0da234567890
💡
Note: by default, images are private in Directus. The article below has more information on how you can deliver and optimize images for a website.
Show Images from Directus on a Website
Adjust file permissions to allow images from the Media Library to be used on a website without authentication.

By continuing to use our website, you consent to use essential cookies. We also use optional tracking cookies which help us gather statistics to improve our services. Do you consent to these cookies?

I Consent Do not track