I'm new to the world of Angular and Typescript, so please forgive me if this question seems silly.
In my single-image view component, I have an Array of image urls/meta-data that are loaded from a local .json file by a service:
...
<img [src]="my_picture.large" [alt]="my_picture.title">
...
Before loading my_picture.large into the DOM, I would like to gather more information about it. Is there a way to do this? For example, I want to know its width, height, aspect ratio, and then react accordingly with different templates depending on whether it is portrait or landscape.
Adding meta information to the json file is an option, but as I am still learning, I am trying to find the best Angular approach to problem-solving. :)
On a related note, is it possible to pre-load images before displaying them on the DOM?