Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Media

Laravel Media Laravel Package

whitecube/laravel-media

Laravel Media offers a simple, configurable way to attach, store, and manage media files in Laravel applications, with support for uploads, conversions, and clean model associations.

View on GitHub
Deep Wiki
Context7

Manage images and other assets for models

Frequently asked questions about Laravel Media
What is whitecube/laravel-media used for?
whitecube/laravel-media is a Laravel package for attaching, storing, and managing images and other media assets on Eloquent models. It supports uploads, conversions or variants, and clean model associations, and v1.0.5 fixes variant generation for new and replaced images while preventing duplicate listener registration.
How do I install whitecube/laravel-media in a Laravel application?
Install it with Composer using composer require whitecube/laravel-media, then follow the package setup steps. In a Laravel app that typically means publishing the configuration and migrations, configuring storage disks, and defining media collections on a pilot model before rolling out.
Which Laravel and PHP versions does whitecube/laravel-media support?
The provided package details do not list an official Laravel and PHP support matrix. Check the package composer.json and README for supported versions, and confirm compatibility in your target application before adoption.
Does whitecube/laravel-media support image conversions and variants?
Yes, the package is designed for uploads, conversions, and automated image variant generation for model-attached media. v1.0.5 specifically improves variant generation for new and replaced images.
Do I need queue workers for media variant generation?
Variant generation can be run through queues in a Laravel setup, and you should run queue workers if generation is configured as queued. The available details do not define the exact fallback when workers are unavailable, so monitor queued jobs and failed jobs in staging before production.
Which image drivers does whitecube/laravel-media support?
The package details do not specify whether GD, Imagick, or both are supported. Confirm the required image driver and PHP extension in the package documentation before deploying to production.
How do I attach media collections to an Eloquent model?
You attach media by defining media collections and associations on your Eloquent models according to the package configuration. Start on a pilot model and verify upload, replace, delete, and variant retrieval flows before applying it to more models.
What happens to variants when an image is replaced?
v1.0.5 fixes variant generation for replaced images, but the available details do not state whether old variants are deleted, regenerated, or retained. Test replacement behavior in staging and document the expected outcome before relying on it in production.
Is v1.0.5 a safe upgrade from v1.0.4?
v1.0.5 is described as a patch release with no stated breaking changes, so it should be treated as a drop-in upgrade from v1.0.4. Because the fix touches core media behavior, still validate repeated create, update, and replace operations, queued jobs, model listeners, and storage paths in your application, including under Laravel Octane if you use it.
How should I handle existing media and variants when adopting the package?
The available details do not describe an automatic migration or backfill for existing media records and variants. Plan a backfill or regeneration strategy, validate it on a copy of production data, and confirm how replacement and deletion affect stored variants before enabling package-managed variants broadly.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections