github webplusmultimedia/filament-json-media v5.3.0

2 hours ago

What's Changed

Features

  • New AsJsonMedia cast: a json media field is read as a collection of Media (images) and Document (other files). The json stored in the database does not change, and the Filament field keeps working
  • New <x-gallery-json-media::image> Blade component: a lazy <img> with the thumbnail of the requested size and the alt of the media, with an optional format (format="webp")
  • New <x-gallery-json-media::responsive-image> Blade component: a srcset of thumbnails in several widths and a <picture> with WebP sources (AVIF optional)
  • New images.responsive config (widths, formats)
  • Media::getSrcset(), and a format argument for Media::getCropUrl()

Security

  • The thumbnail urls of local images are signed with Laravel signed urls, instead of a md5 token

Fixes

  • Local thumbnails are generated on the disk of their image, instead of the default disk of the package

Other

  • CI on PHP 8.3 and 8.4 with Laravel 12 and 13

Upgrade notes

  • The signing_key config is removed, you can delete it from your published config
  • Thumbnail urls with the former _token return 403: thumbnails already generated are still served, regenerate the pages you cache (HTML, CDN) to get the new signed urls
  • The images.responsive config is optional, its defaults apply when your published config does not have it

Full Changelog: v5.2.0...v5.3.0

Don't miss a new filament-json-media release

NewReleases is sending notifications on new releases.