Use resize_to_cover
instead of resize_to_fit
for all images
#618
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our current usage of
resize_to_fit
doesn't really fit the way we display images. We are guaranteed a the maximum of the biggest dimension, but this means we can't be sure of the size of the smallest dimension. We places these images in cards where assume that they can be shown at ± the dimensions of the resize. This can result in low quality results when the image has a high aspect ratio.For example: I recently added an image that has a ratio of 3/1 , this is 500px x 167px after using
resize_to_fit: [500, 500]
. If this is displayed at 500px/500px, the image won't be shown at a decent quality. If we useresize_to_cover: [500, 500]
the result will be 1500px x 500px, so it can be safely placed in a 500px/500px container. (This was sadly the only image provided as album artwork.)Two downsides: