NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #437 most downloaded on Packagist
Associate files with Eloquent models
Latest stable
11.23.13
Last release 9 days ago
13 Nov 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
525 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Remove orphaned media records when storing an original file throws a Flysystem exception. Covers local uploads, same-disk copies and cross-disk stream
PHP and Laravel requirements are unchanged. All 16 PHP/Laravel dependency-matrix jobs, Pint and PHPStan passed on both the PR head and the merged commit.
Full Changelog: 11.23.12...11.23.13
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Use the conversion MIME type for streamed attachment and inline responses instead of the original file MIME type. Includes regression coverage for sep
media-library:regenerate --only-missing checking the original disk instead of the conversions disk. Existing conversions are now preserved while missing conversions are regenerated when stored on a separate disk. Fixes #3975. By @x-adam in #3976.PHP and Laravel requirements are unchanged. Both fixes passed the full 16-job PHP/Laravel dependency matrix, PHPStan, and formatting checks, followed by green combined-main checks.
Full Changelog: 11.23.11...11.23.12
Fix addMediaFromDisk() losing the source file when a same-disk copy returns false . Failed copies now throw DiskCannotBeAccessed , remove the failed m
addMediaFromDisk() losing the source file when a same-disk copy returns false. Failed copies now throw DiskCannotBeAccessed, remove the failed media record, and retain the source file. By @kinsflow in #3969.preservingOriginal() behavior.PHP and Laravel requirements are unchanged. The separate, pre-existing orphan-record issue with filesystem throw=true is not changed by this release; that mode already preserves the source file.
Full Changelog: 11.23.10...11.23.11
Clean up temporary directories when conversions or responsive-image generation fail or return early, while preserving the original media files and pro
PHP 8.2+ remains supported. End-of-life Laravel 10 and 11 are no longer supported; Laravel 12+ is now required.
Full Changelog: 11.23.9...11.23.10
Replace all Unicode space separators in the default file name sanitizer by @chengkangzai in #3965
Full Changelog: 11.23.8...11.23.9
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.23.8...11.23.9
Fix keepOriginalImageFormat() encoding conversions as JPEG when the original file has an uppercase extension by @moemadeldin in #3964
keepOriginalImageFormat() encoding conversions as JPEG when the original file has an uppercase extension by @moemadeldin in #3964Full Changelog: 11.23.7...11.23.8
keepOriginalImageFormat() encoding conversions as JPEG when the original file has an uppercase extension by @moemadeldin in https://github.com/spatie/laravel-medialibrary/pull/3964Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.23.7...11.23.8
Fix media-library:clean ignoring custom PathGenerator for orphaned directories by @nikolauspschuetz in #3948
Full Changelog: 11.23.6...11.23.7
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.23.6...11.23.7
Document the addMediaFrom* and getFirstMedia / getLastMedia methods on the HasMedia interface with @method , so calls on a Model&HasMedia intersection
addMediaFrom* and getFirstMedia/getLastMedia methods on the HasMedia interface with @method, so calls on a Model&HasMedia intersection type no longer trip up static analysis by @freekmurze in #3962Full Changelog: 11.23.5...11.23.6
addMediaFrom* and getFirstMedia/getLastMedia methods on the HasMedia interface with @method, so calls on a Model&HasMedia intersection type no longer trip up static analysis by @freekmurze in https://github.com/spatie/laravel-medialibrary/issues/3962Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.23.5...11.23.6
Decode remote url path before stripping directory in addMediaFromUrl by @bunlongheng in #3961
Full Changelog: 11.23.4...11.23.5
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.23.4...11.23.5
docs: fix HasMedia interface import in custom image generator by @latent-9 in #3960
Full Changelog: 11.23.3...11.23.4
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.23.3...11.23.4
Remove period from the command description by @kminek in https://github.com/spatie/laravel-medialibrary/pull/3953
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.23.2...11.23.3
Bump actions/checkout from 6 to 7 by @dependabot[bot] in https://github.com/spatie/laravel-medialibrary/pull/3946
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.23.1...11.23.2
Strip path-traversal (..) segments from the zip_filename_prefix custom property so MediaStream can no longer emit ZIP archives with traversal entries
..) segments from the zip_filename_prefix custom property so MediaStream can no longer emit ZIP archives with traversal entries (zip-slip defense-in-depth) #3947Update Retrieving converted images documentation to include getAvailableTemporaryUrl by @Orrison in https://github.com/spatie/laravel-medialibrary/pul
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.22.1...11.23.0
Removed stray 3MB speaking-page.png from the repo root, accidentally committed in a previous "wip" commit. Reduces the size of the package archive dow
speaking-page.png from the repo root, accidentally committed in a previous "wip" commit. Reduces the size of the package archive downloaded by Composer.Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.22.0...11.22.1
Bump dependabot/fetch-metadata from 2 to 3 by @dependabot[bot] in https://github.com/spatie/laravel-medialibrary/pull/3931
deferred() conversion option by @ziadoz in https://github.com/spatie/laravel-medialibrary/pull/3922Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.21.2...11.22.0
fix: skip URL encoding for S3 disk to prevent double encoding by @moemadeldin in https://github.com/spatie/laravel-medialibrary/pull/3934
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.21.1...11.21.2
Fix docs bugs: 'to the where' typo and 'how to working with conversio… by @tareq-halaby in https://github.com/spatie/laravel-medialibrary/pull/3928
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.21.0...11.21.1
## What's Changed - Add Laravel 13 support
Add getAvailableTemporaryUrl method
getAvailableTemporaryUrl method (#3919)Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.19.0...11.20.0
Add Laravel Boost v2 skill by @freekmurze in https://github.com/spatie/laravel-medialibrary/pull/3917
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.18.2...11.19.0
Fix setNewOrder breaking with non-sequential array keys by @freekmurze in https://github.com/spatie/laravel-medialibrary/pull/3916
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.18.1...11.18.2
Revert breaking interface change on registerAllMediaConversions() — the ?Media $media = null parameter that was added to the HasMedia interface in v11
registerAllMediaConversions() — the ?Media $media = null parameter that was added to the HasMedia interface in v11.18.0 has been removed, as it broke userland code that overrides the method without the parameter. The PHPStan error is now handled via the baseline instead. Fixes #3915.Add vips as a documented image driver option by @freekmurze in https://github.com/spatie/laravel-medialibrary/pull/3911
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.10...11.18.0
Add getAvailablePathRelativeToRoot() method by @adriaanzon in https://github.com/spatie/laravel-medialibrary/pull/3877
getAvailablePathRelativeToRoot() method by @adriaanzon in https://github.com/spatie/laravel-medialibrary/pull/3877This new method is similar to getAvailablePath() but calls getPathRelativeToRoot() instead of getPath(). This is useful when working with both local and cloud filesystem drivers, as getPath() returns an absolute path that cannot be passed to Storage::get().
Example usage:
Storage::disk($media->disk)->get(
$media->getAvailablePathRelativeToRoot(['conversion'])
)
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.9...11.17.10
getAvailablePathRelativeToRoot() method by @adriaanzon in https://github.com/spatie/laravel-medialibrary/pull/3877Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.9...11.17.10
Fix getStream path concatenation for custom PathGenerator by @dmitrakovich in https://github.com/spatie/laravel-medialibrary/pull/3904
This fix resolves an issue where getStream() was forcing directory-style paths, making it impossible to use custom PathGenerators with non-directory paths (like prefixes). The fix allows developers to use filename prefixes such as {basePath}-{fileName}.
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.8...11.17.9
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.8...11.17.9
feat: faster clean command via hash lookup by @ImJustToNy in https://github.com/spatie/laravel-medialibrary/pull/3898
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.7...11.17.8
Fix PHPDoc property name to use snake_case by @michael-tscholl in https://github.com/spatie/laravel-medialibrary/pull/3895
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.6...11.17.7
Fix imagedestroy deprecation by @erikn69 in https://github.com/spatie/laravel-medialibrary/pull/3893
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.5...11.17.6
fix: duration should be parsed as float by @francoism90 in https://github.com/spatie/laravel-medialibrary/pull/3869
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.4...11.17.5
Add m4v format clean by @imhayatunnabi in https://github.com/spatie/laravel-medialibrary/pull/3873
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.3...11.17.4
Improve media library with safeguards by @imhayatunnabi in https://github.com/spatie/laravel-medialibrary/pull/3867
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.2...11.17.3
Added Symfony 8 support to all symfony/* packages. by @thecaliskan in https://github.com/spatie/laravel-medialibrary/pull/3864
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.1...11.17.2
Add timeout and threads configuration for FFMpeg by @francoism90 in https://github.com/spatie/laravel-medialibrary/pull/3862
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.17.0...11.17.1
docs: add installation instructions for image optimizers on Alpine Linux by @nastoychev in https://github.com/spatie/laravel-medialibrary/pull/3845
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.14.0...11.17.0
Test PHP 8.5 by @erikn69 in https://github.com/spatie/laravel-medialibrary/pull/3857
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.15.0...11.16.0
docs: add installation instructions for image optimizers on Alpine Linux by @nastoychev in https://github.com/spatie/laravel-medialibrary/pull/3845
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.14.0...11.15.0
Feat: set default expiration minutes when no value passes in args for temp url by @chinmaypurav in https://github.com/spatie/laravel-medialibrary/pull
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.13.0...11.14.0
Add support for LastMedia functions by @bAngerman in https://github.com/spatie/laravel-medialibrary/pull/3818
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.12.9...11.13.0
Add null check for temporary model instance by @sebastiaanluca in https://github.com/spatie/laravel-medialibrary/pull/3801
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.12.8...11.12.9
Dynamically check instance of temporary upload model by @sebastiaanluca in https://github.com/spatie/laravel-medialibrary/pull/3795
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.12.7...11.12.8
chore: update README for test documentation by @JavoByte in https://github.com/spatie/laravel-medialibrary/pull/3790
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.12.6...11.12.7
fix: media manipulations should be applied before media conversions by @JavoByte in https://github.com/spatie/laravel-medialibrary/pull/3783
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.12.5...11.12.6
Laravel 12 Support by @erikn69 in https://github.com/spatie/laravel-medialibrary/pull/3785
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.12.4...11.12.5
Add @return $this annotation to methods by @lorenzolosa in https://github.com/spatie/laravel-medialibrary/pull/3780
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.12.3...11.12.4
Add default types for template by @sforward in https://github.com/spatie/laravel-medialibrary/pull/3779
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.12.2...11.12.3
Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot in https://github.com/spatie/laravel-medialibrary/pull/3773
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.12.1...11.12.2
Add alt attribute to responsive image components by @A909M in https://github.com/spatie/laravel-medialibrary/pull/3765
alt attribute to responsive image components by @A909M in https://github.com/spatie/laravel-medialibrary/pull/3765Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.12.0...11.12.1
chore: media relation add generic docblock by @JeRabix in https://github.com/spatie/laravel-medialibrary/pull/3760
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.11.1...11.12.0
Fix to broken tests for Responsive Media Conversions. by @aSeriousDeveloper in https://github.com/spatie/laravel-medialibrary/pull/3743
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.11.0...11.11.1
Allow withResponsiveImages to be conditionally set by @aSeriousDeveloper in https://github.com/spatie/laravel-medialibrary/pull/3742
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.10.1...11.11.0
Fix adding orientation as a manipulation. by @timvandijck
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.10.0...11.10.1
Test against php 8.4 by @sergiy-petrov in https://github.com/spatie/laravel-medialibrary/pull/3719
storeConversionsOnDisk() function by @djl997 in https://github.com/spatie/laravel-medialibrary/pull/3722Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.9.2...11.10.0
fix wrong number by @zackAJ in https://github.com/spatie/laravel-medialibrary/pull/3713
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.9.1...11.9.2
fix: make media-library:clean use of media prefix by @ImJustToNy in https://github.com/spatie/laravel-medialibrary/pull/3704
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.9.0...11.9.1
Added config variable to disable dispatching jobs after commit by @chrispage1 in https://github.com/spatie/laravel-medialibrary/pull/3698
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.8.3...11.9.0
Dispatch conversion jobs after database transactions have been committed by @chrispage1 in https://github.com/spatie/laravel-medialibrary/pull/3687
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.8.2...11.8.3
Correctly remove media folders after removing all media files by @StyxUA in https://github.com/spatie/laravel-medialibrary/pull/3688
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.8.1...11.8.2
Adjust sanitization of PHP file extensions in FileAdder.php by @rmdavi in https://github.com/spatie/laravel-medialibrary/pull/3681
FileAdder.php by @rmdavi in https://github.com/spatie/laravel-medialibrary/pull/3681Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.8.0...11.8.1
Added ability to programatically specify custom queue on FileAdder by @chrispage1 in https://github.com/spatie/laravel-medialibrary/pull/3676
Full Changelog: https://github.com/spatie/laravel-medialibrary/compare/11.7.6...11.8.0
One column per quarter.