Gallery image dimensions or aspect ratio

#1

Hi all,

I’ve recently started working with Cockpit and I am using the API to serve a gallery of images to the frontend. For display purposes, I’d like to return the image aspect ratio information in the image metadata.

Currently the only metadata returned by the API for an image in a gallery is “Title” and “Asset”, is it possible to extend this to allow for the user to to enter the aspect ratio when uploading - or if there was someway to have cockpit run a script on upload to calculate this?

0 Likes