knplabs/knp-media-exposer-bundle
Symfony bundle that turns media references into public or protected URLs. Define media paths, apply voters to control access, and generate signed links for images, videos, or downloads. Custom resolvers and URL generators keep file exposure logic out of your controllers.
Storage::url() / Storage::temporaryUrl() plus a thin MediaUrlResolver service already cover the mainstream case, so the "buy" answer is "use native + an edge CDN," not "adopt this."Consider it only in a narrow, generally inadvisable set of conditions:
knp_media_exposer.exposer is already wired and in use, and your goal is "keep it running" or "plan the replacement," not "add a dependency."Look elsewhere in essentially every other case:
league/flysystem + a signing layer, Laravel's Storage facade with temporary URL generation, a maintained media library (e.g. Spatie Media Library), or a managed media CDN (Cloudinary, imgix, Bunny) for transformation and signed delivery.Bottom line: do not adopt. Mine it for design input and fix the intake filter.
For executives: This is a 7-star, zero-dependent, archived Symfony bundle whose maintainer has publicly stepped away. There is no support path, no security-patch stream, and no adoption evidence. Taking it as a dependency would create a small but permanent maintenance liability for a capability we can meet with well-supported libraries or a managed media CDN. It also surfaced in a Laravel-oriented evaluation despite being a Symfony bundle — a classification error worth correcting upstream so it isn't scored again. Recommendation: pass.
For engineering: The value is conceptual. The underlying MediaExposer library abstracts "media identifier → public URL" across storage backends and supports signed/temporary URLs — a pattern worth copying if we build media delivery, private asset gating, or multi-backend URL resolution. Do not add this to composer.json; a composer require in a throwaway branch will almost certainly fail on platform constraints anyway, and that's the cheapest test. In Laravel the native answer (filesystems.php disks as the strategy registry, Storage::url(), Storage::temporaryUrl(), plus a thin resolver service if multiple backends must be abstracted) is roughly one to two days of fully owned, testable work. If we ever need the exact Symfony integration, we would fork and own it — a named-owner, sunset-dated staffing decision, not a dependency addition. And tighten intake: framework and maintenance status should be pre-filters before scoring.
How can I help you explore Laravel packages today?