Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Matrix field thumbnail layout shift #16748

Open
ryanleichty opened this issue Feb 21, 2025 · 0 comments
Open

[5.x]: Matrix field thumbnail layout shift #16748

ryanleichty opened this issue Feb 21, 2025 · 0 comments
Labels

Comments

@ryanleichty
Copy link

What happened?

Description

There's a decent amount of layout shift when loading an entry with a matrix field that includes thumbnails due to the thumbnails (and maybe other images too?) that don't have their width and height specified.

Adding the width and height to the image or adding an aspect ratio resolves most of the layout shift on the page.

Image

Steps to reproduce

  1. Open an entry with a matrix field that has a bunch of entries with thumbnail images.
  2. Scroll down the page before all of the images load to experience how the layout shift impacts the editing experience (you may need to throttle the network if you have amazing download speeds or the images cached)

Expected behavior

I would expect less layout shift if all of the images have their width and height/aspect ratio applied.

Actual behavior

Lots of layout shift.

Craft CMS version

5.6.7

PHP version

8.2.26

Operating system and version

Linux 5.10.233-224.894.amzn2.x86_64

Database type and version

MySQL 8.0.35

Image driver and version

Imagick 3.7.0 (ImageMagick 7.1.1-32)

Installed plugins and versions

Alt Text Generator 5.2.1
Amazon S3 2.2.1
Asset Usage 4.1.3
CKEditor 4.6.0
Colour Swatches 5.1.0
Donkeytail 5.0.0-beta.1
Empty Coalesce 5.0.0
Hyper 2.2.2
Image Hotspots 3.0.1
Neo 5.2.22
Retcon 3.2.1
Retour 5.0.5
Template Selector 5.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant