I have a scenario where I want to have an <img /> inside a <lockup /> but I want the image to maintain its aspect ratio. The dimensions of the image may not be known ahead of time such that a proper `width` and `height` attribute may be set on the <img /> tag. This increasingly problematic with attempting to use <prototype /> as the image dimensions need to be known up front. I'd prefer to be able to fix one dimension to a known value, say `height="280"` and have the <img /> element automatically set its width based on the actual width of the image to maintain the proper aspect ratio.
Looking through the docs (https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/ATV_Template_Guide/TVJSAttributes.html) it looks like this may be available with the `contentMode` attribute but it doesn't appear to work.
The following combinations were tried without success:
<lockup style="height: 300; width: 200">
<img src="path/to/image" contentMode="aspect-fit" />
</lockup>
<lockup style="height: 300; width: 200">
<img src="path/to/image" contentMode="aspect-fit" height="300"/>
</lockup>
<img />s won't display if both the `height` and `width` attribute are not set which seems to go against the idea of the `contentMode` attribute. When it is set the aspect ratio is fixed at that time and it doesn't appear that `contentMode` applies. This was tried against the latest version of tvOS 11.3.