Skip to content

1.9.0

Latest

Choose a tag to compare

@rafaucau rafaucau released this 30 Apr 14:13
499e8d8

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

Full Changelog: 1.8.11...1.9.0