You can get properties of an image from SharePoint library with RestAPI
The request looks like this:
https://markimarta.com/sites/Euro2024/bestboat/_api/Web/GetFileByServerRelativeUrl('/sites/Euro2024/bestboat/VoteLib/Team2/Regal.jpg')/Properties
The result is XML from which you should extract the values you want to use.