Skip to content

[6.x] Don't stretch images to 100% height otherwise SVGs can look squashed#14003

Open
JayGeorge wants to merge 2 commits into6.xfrom
fix-asset-fieldtype-svg-aspect-ratio
Open

[6.x] Don't stretch images to 100% height otherwise SVGs can look squashed#14003
JayGeorge wants to merge 2 commits into6.xfrom
fix-asset-fieldtype-svg-aspect-ratio

Conversation

@JayGeorge
Copy link
Contributor

Description of the Problem

  • Currently size-full is applied to thumbnail sizes in the asset editor.
  • This can cause some issues when there are taller SVGs that have a different aspect ratio to other SVGs on the asset row. The shorter SVGs get stretched to fill the height of the row.

You can see this here, where the second image from the left (BBC) is stretched because the third image from the left, which is square, changes the aspect ratio of the the row:

image

What this PR Does

  • Switches size-full for w-full

Before Examples

image image

After Examples

image image

How to Reproduce

  1. Upload some SVGs with different aspect ratios to an asset field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments