I am using Ionic 1.x and Angular 1.x, I display an avatar image thats usually square but not always, I want it to be full width, and then square, so if the screen is 720px wide, I want a 720px tall and wide image, if the image is larger than this size, it should hide the excess (ideally in a smart way).
I have only included the ionic styles, and a few of my own, so bootstrap isnt included in this project.
I would be happy applying a class with width: 100% to the image, and a height: auto, but the height should not be more than the width.
As mentioned it needs to be responsive as it will be shown on a variety of screen sizes, so the image I wont always know to set the size for... I could use some JS to manually calculate and set the sizes, but is that not a bit clunky?
I had a look for directives but could find none.