kirby-json-api icon indicating copy to clipboard operation
kirby-json-api copied to clipboard

Accessing file field information in same place as image field

Open simonhrogers opened this issue 7 years ago • 0 comments

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.

simonhrogers avatar Jan 06 '19 11:01 simonhrogers