Example:
This pic of day is very wide:
So when it was pic of the day it looked terrible - tap the image below to see how bad it looked:
Reason:
For the sake of argument:
- imagine this image is natively 1000 x 100 px
- imagine the pic of day "container" area is 100 x 100 px
So if we request a scaled version of the image to perfectly fit the 100 px container width we would receive a 100 x 10 px image.
This scaled version's area is 100 x 10 = 1000.
The problem is the pic of the container is ten times that - 100 x 100 = 10,000.
This means when the scaled image then undergoes aspect fill, it will be vastly stretched (10x vertically) and look terrible - as you can see in the screenshot.
I see two ways to fix this.
- Use the image's width to height ratio to request a scaled resolution which requires less than some maximum acceptable stretching - can be done with the container dimension and image's native resolution (which I think we get or can?).
- Use aspect fit instead of fill when scale image area is beneath a certain percentage of the container area.