I’ve started using Cockpit for my single page app, which is a simple portfolio: title, description, gallery. I have kind of main page, with small thumbnail of each project.
What I need is to attach url to thumbnail of specific size, for each entry, INSIDE response of ‘/api/collections/get…’. I don’t want to use ‘/api/cockpit/image…’, because as far as I understand I would have to use it X times in a row.
I know PHP a bit and I’m not afraid to mess a bit inside files, with a little help and advice where to look for.
I see it like this: I have a field of Image type with defined name (ie. ‘featuredImage’). Then I put inside PHP rules to create thumbnail of this particular image, put its URL inside entry data (ie. ‘_thumbnailURL’) and attach this field to the API response every time.
Thanks in advance for any help or advice.