Skip to content

[6.x] Avoid stretching images to 100% height#14003

Merged
jasonvarga merged 2 commits into6.xfrom
fix-asset-fieldtype-svg-aspect-ratio
Feb 20, 2026
Merged

[6.x] Avoid stretching images to 100% height#14003
jasonvarga merged 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

@jasonvarga jasonvarga changed the title [6.x] Don't stretch images to 100% height otherwise SVGs can look squashed [6.x] Avoid stretching images to 100% height Feb 20, 2026
@jasonvarga jasonvarga merged commit 168f6e4 into 6.x Feb 20, 2026
12 checks passed
@jasonvarga jasonvarga deleted the fix-asset-fieldtype-svg-aspect-ratio branch February 20, 2026 21:25
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.

2 participants