GET /:project/assets/:key
Legacy Version
These are the docs for Directus 8, a legacy version of the platform. If you're looking for the current Directus 9 documentation, go here: https://docs.directus.io
Assets (Thumbnails)
Image typed files can be dynamically resized and transformed to fit any need.
Get an asset
Get a resized file. Files are resized on demand.
Parameters
required
projectThe project you're targetting.
required
keyprivate_hash
of the file.
Query
optional
keyThe key of the asset size configured in settings.
optional
wWidth of the file in pixels.
optional
hHeight of the file in pixels.
optional
fFit. One of crop
, contain
.
optional
qQuality of compression. Number between 1 and 100.
If you're using key
, you don't need to specify any of the other query parameters. If you're using w
, h
, or any of the others, you're required to provide them all. This allows Directus to match it against the whitelist in settings. If you have the whitelist turned off completely, any combination is allowed.