V8-archive: Return specific thumbnails (URL) via API items response

Created on 26 Feb 2020  路  4Comments  路  Source: directus/v8-archive

How to request specific thumbnail?

https://api2.konpoli.eu/api/items/banners?fields=t.image.data.thumbnails,t.main_title,t.subtitle,t.link&lang=de

Whatever I tried I just can't get only the needed thumbnail as a response.
Is there any workaround?

enhancement question

All 4 comments

I don't think there's a way to filter the subset of related data for a specific custom thumbnail like that. The only workaround would be to fetch the asset separately using the /assets endpoint

We could return the thumbnail URLs (based on the whitelist) as a metadata option... those URLs should be enough, right?

It already does that, but it returns all the available thumbnails, not just a specific one you're looking for.

This becomes a problem because, while I have to keep the thumbnails needed by directus unaltered and also add 2-3 sizes for my app, I end up with hundreds of thumbnail paths on the response.
It would be amazing though if we could filter by their names like 'directus-medium-crop' etc.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cdwmhcc picture cdwmhcc  路  3Comments

cdwmhcc picture cdwmhcc  路  3Comments

maettyhawk picture maettyhawk  路  3Comments

24js picture 24js  路  3Comments

HashemKhalifa picture HashemKhalifa  路  3Comments