Make gallery field return image sizes


I’m hacking with Cockpit CMS and returning image gallery to frontend. Our designer team wants to upload pack of images to gallery and let them wrap as they fill screen width.

So on frontend we have max screen width and if we will have width of each image in gallery we would calculate percentage and set flex basis for each image.

But for now I cannot learn backend to return image sizes alognside with path. I searched over cockpit files but no luck.

If somebody let me know at least location of file responsible for gallery field output it would be very usefull.