This is a security release, upgrading is strongly recommended
mediable.allowed_remote_hosts configuration which allows restricting remote URL source adapters to a whitelist. Wildcard subdomains may be specified with *.example.com syntax. By default, all hosts are allowed.mediable.allowed_remote_hosts allow list is provided, the RemoteUrlAdapter will reject private IP addresses and localhost by default, to prevent Server-Side Request Forgery (SSRF) attacks. [CVE-2026-49969]mediable.allowed_remote_schemes configuration which allows restricting remote URL source adapters to a whitelist of allowed URL schemes (e.g. http, https, ftp, etc.). By default, only https is allowed. When modifying this configuration, it may also be necessary to modify the source_adapters pattern matching.. characters from path segments. This prevents attackers from using directory traversal patterns like ../ as well as preventing potential issues with certain filesystems where . characters in directory names may cause unexpected behaviour. [CVE-2026-49970]mediable.file_sanitizers configuration which allows specifying custom sanitizers for rewriting file contents to strip out security risks before they are uploaded. A sanitizer must implements the Plank\Mediable\Sanitizers\SanitizerInterface interface.SvgSanitizer which will strip executable javascript and other untrusted content from image/svg+xml files, which can result in stored XSS if rendered directly to a webpage. By default, this sanitizer is applied to all uploaded SVG files. It can be disabled by removing it from the mediable.sanitizers config array. [CVE-2026-49971]mediable.forbidden_file_extensions configuration and MediaUploader::setForbiddenExtensions() which allows specifying a blacklist of file extensions that are forbidden to be uploaded. Any file extension which is considered executable by your Apache or Nginx configuration should be included in this list. A number of common executable file extensions are included in this list by default to prevent remote code execution exploits.script.php.jpg becomes script-php.jpg). This prevents remote code execution from double extension bypass due to common Apache and Nginx misconfigurationsmediable.forbidden_mime_types configuration and MediaUploader::setForbiddenMimeTypes() which allows specifying a blacklist of MIME types that are forbidden to be uploaded.Plank\Mediable\Enum\OnDuplicateBehaviour enum.MediaUploaderConfiguration class. Most MediaUploader instance properties are moved to this class. The MediaUploader class now accepts this as a constructor argument instead of an array of configs.MediaUploader::beforeSave() now accepts a \Closure instead of a callable for better static analysis and type safety.Full Changelog: https://github.com/plank/laravel-mediable/compare/6.5.0...7.0.0
ImageManipulation::setOutputOptions(), to support various intervention/image output format settingsImageManipulation::setOutputQuality(). Use the 'quality' key in setOutputOptions() insteadFull Changelog: https://github.com/plank/laravel-mediable/compare/6.4.0...6.5.0
Full Changelog: https://github.com/plank/laravel-mediable/compare/6.3.1...6.4.0
Full Changelog: https://github.com/plank/laravel-mediable/compare/6.3.0...6.3.1
Full Changelog: https://github.com/plank/laravel-mediable/compare/6.2.1...6.3.0
Full Changelog: https://github.com/plank/laravel-mediable/compare/6.2.0...6.2.1
Full Changelog: https://github.com/plank/laravel-mediable/compare/6.1.3...6.2.0
Full Changelog: https://github.com/plank/laravel-mediable/compare/6.1.2...6.1.3
Full Changelog: https://github.com/plank/laravel-mediable/compare/6.1.1...6.1.2
Full Changelog: https://github.com/plank/laravel-mediable/compare/6.1.0...6.1.1
plank/laravel-mediable and intervention/image-laravel at the same timeFull Changelog: https://github.com/plank/laravel-mediable/compare/6.0.5...6.1.0
Full Changelog: https://github.com/plank/laravel-mediable/compare/6.0.4...6.0.5
Full Changelog: https://github.com/plank/laravel-mediable/compare/6.0.3...6.0.4
Full Changelog: https://github.com/plank/laravel-mediable/compare/6.0.2...6.0.3
intervention/image-laravel to the composer suggests listFull Changelog: https://github.com/plank/laravel-mediable/compare/6.0.1...6.0.2
Full Changelog: https://github.com/plank/laravel-mediable/compare/6.0.0...6.0.1
Version 6.0 contains numerous long-requested feature additions, quality of life improvements and optimizations under the hood.
MediableInterface which lists all methods added by the traitwithAltAttribute() method to set the alt attribute on the generated media record.MediaUploader::applyImageManipulation() to make changes to the original uploaded image during the upload process.MediaUploader::validateHash() to ensure that the hash of the uploaded file matches a particular value during upload. Supports any hashing algorithm supported by PHP's hash() function.MediaUploader::preferClientMimeType() to indicate that the MIME type provided by the source should be used instead, if provided. The default behaviour can be configured with the 'prefer_client_mime_type' key in the config/mediable.php file.MediaUploader::useHashForFilename() method now accepts an optional parameter to specify which hashing algorithm to use to generate the filename. Supports any hashing algorithm supported by PHP's hash() function.makePublic()/makePrivate() methods are not called, instead of assuming public visibility.data:image/jpeg;base64,....All SourceAdapter classes have been significantly refactored.
temp:// to avoid repeated HTTP requests.getStreamResource() method. The method has been replaced with the getStream(): StreamInterface, which returns a PSR-7 stream implementation instead.hash(string $algo): string method which is expected to return the hash of the file contents using the specified algorithm.filename() and extension() method is now nullable. If the adapter cannot determine the value from the information available, it should return null.getContents() method. The getStream()->getContents() method may be used instead.getSource() method. No replacement.path() method. No replacement.valid() method. SourceAdapters should now throw an exception with a more helpful message from the constructor if the source is not valid.jpegoptim, pngquant, optipng, gifsicle, etc.)config/mediable.php file to specify the optimization tools to use and their arguments.ImageManipulation::noOptimization() and ImageManipulation::optimize(?array $optimizers = null) methods to allow overriding the defaults set in the config file.ImageManipulation::useHashForFilename() method now accepts an optional parameter to specify which hashing algorithm to use to generate the filename. Supports any hashing algorithm supported by PHP's hash() function.ImageManipulation::usingHashForFilename() method has been renamed to ImageManipulation::isUsingHashForFilename() to avoid confusion with the useHashForFilename() method.alt attribute to the Media model.url attribute which will generate a URL for the file (equivalent to the getUrl() method).MediableCollection annotions to support generic types.\Plank\Mediable\Stream class in favor of the guzzlehttp/psr7 implementation. This removes the direct dependency on the psr/http-message library.\Plank\Mediable\HandlesMediaUploadExceptions::transformMediaUploadException() parameter and return type changed from \Exception to \Throwable.Full Changelog: https://github.com/plank/laravel-mediable/compare/5.9.1...6.0.0
Full Changelog: https://github.com/plank/laravel-mediable/compare/5.9.0...5.9.1
Full Changelog: https://github.com/plank/laravel-mediable/compare/5.8.0...5.9.0
Full Changelog: https://github.com/plank/laravel-mediable/compare/5.7.0...5.8.0
Full Changelog: https://github.com/plank/laravel-mediable/compare/5.6.0...5.7.0
ImageManipulator::getVariantDefinitionsByTag() and ImageManipulator::getVariantNamesByTag() to more easily retrieve a group of variants intended for a specific purposeImageManipulator::getAllVariantDefinitions() and ImageManipulator::getAllVariantNames()MediaUploader::import() not working if the extension of the existing file is uppercase.application/octet-stream (changed in recent version of Flysystem)stream_for() deprecationMediaUploader::onDuplicateReplaceWithVariants() which behaves similar to onDuplicateReplace() but will also delete any variants of the replaced Media record.onDuplicateUpdate() failing if file exists but without a matching model.How can I help you explore Laravel packages today?