What's Changed
[1.x] feat: store image dimensions to prevent layout shifts on lazy-loaded images by @huoxin233 in #478
The width and height of JPEG, PNG, and GIF uploads are now stored in the database. These are injected as width and height attributes on the <img> tag in the Image Preview template, which allows the browser to reserve the correct amount of space before the image loads — preventing Cumulative Layout Shift (CLS).
A console command — php flarum fof:upload:backfill-dimensions — backfills dimensions for existing images.
New Contributors
- @huoxin233 made their first contribution in #478
Full Changelog: 1.8.11...1.9.0