- What does the dejwcake/craftable-media package actually do?
- Craftable Media lets you associate uploaded files and images with Laravel Eloquent models. It provides media collections, conversion and processing pipelines, and storage-disk URL generation so you can attach, organize, and serve media without writing repetitive file-handling code. The package is aimed at Laravel and Craftable projects that want admin-friendly media management.
- How do I install and set up Craftable Media in a Laravel application?
- Adoption is a Composer install plus publishing the package migrations and a filesystem or disk configuration entry. You then attach the provided media trait to an Eloquent model and run migrations against your database. No infrastructure beyond a storage target is required, although conversions need a queue worker and an image-processing binary if you enable them.
- Which Laravel and PHP versions does Craftable Media support?
- The supported Laravel and PHP matrix is not documented in the material available for this package. The technical assessment assumes a Laravel application running a currently supported PHP 8.x runtime. Before adopting, confirm the exact version matrix and whether it is enforced in CI or only documented.
- Do media conversions run synchronously, or do I need a queue worker?
- The package exposes a ProcessMediaTrait, which is consistent with a queue-friendly conversion pipeline that fits Laravel's queue abstraction rather than a custom worker. Conversions typically require a queue worker and an image or processing binary when enabled. Confirm whether conversions are synchronous by default for your intended use case.
- Can I store media on S3 or my existing object store?
- Craftable Media delegates persistence to configured Laravel filesystem disks, and its LocalUrlGenerator produces URLs for stored media. That design usually means you can point it at a local disk or an S3-compatible object store using Laravel's existing disk drivers. Verify the storage abstraction contract before assuming no custom adapter is needed.
- How do I attach images or files to an Eloquent model with this package?
- You associate files with models by applying the package's media trait to the model and working through the MediaCollection class surface. Collections let you group uploads, such as avatars versus documents, and keep file handling reusable across your application. The trait-based approach means you can adopt it incrementally on a single model before rolling it out further.
- Is upgrading to version 2.0.1 safe?
- Version 2.0.1 is described as an internal refactor that replaces the app() helper with Container::getInstance()->make() in three classes, with no changes to the public API, config keys, schema, or storage layout. Both idioms resolve the same singleton container in a bootstrapped Laravel app, so behaviour should hold under HTTP, queue, and Octane execution. Teams with heavy container mocking in their own test suites should confirm their fakes still hit the same bindings.
- Does Craftable Media work with PostgreSQL and MariaDB?
- The release CI matrix runs over PostgreSQL and MariaDB using a healthchecked docker-compose setup and a dedicated Laravel database user. That is direct evidence the persistence layer is exercised against two non-MySQL engines, which raises confidence for teams standardising on Postgres or MariaDB. Treat it as evidence of intent and coverage rather than a formal guarantee, and check the CI results yourself.
- What are the main risks of adopting a media package like this?
- Media handling is a sticky dependency: once rows exist in the media table and objects exist on disk, swapping packages means migrating data and rewriting URLs for anything already served or embedded. You should also weigh the version ambiguity, since the 2.0.1 release number sits well below the line of the most widely used package with this class surface. Compare alternatives against your storage, conversion, and admin requirements before committing.
- Is Craftable Media actively maintained, and who supports it?
- The releasing party and support commitment are unclear from the available evidence, and the 2.0.1 version number suggests either a private or forked distribution or a repackaged internal build. There is also no record of what changed in 2.0.0, so breaking-change exposure in the 2.x line is unknown. Resolve whether this is the public upstream package, an internal fork, or a vendor distribution before sign-off.