kirby-json-api
kirby-json-api copied to clipboard
Accessing file field information in same place as image field
Hey!
My ideal would be:
"structured": [
{
"title": "My Title",
"file": {
url: "....",
title: "....",
dimensions: "....",
orientation: "....",
}
},
{
"title": "Sub-Item 2",
"file": {
url: "....",
title: "....",
dimensions: "....",
orientation: "....",
}
},
{
"title": "Last",
"file": {
url: "....",
title: "....",
dimensions: "....",
orientation: "....",
}
}
]
and not:
"structured": [
{
"title": "My Title",
"image": "filename.jpg"
},
{
"title": "Sub-Item 2",
"image": "filename.jpg"
},
{
"title": "Last",
"image": "filename.jpg"
}
]
Is there a way to associate file data with the relevant image field like this? It would save having to do a lot of transformation in the client.