knplabs/media-exposer
KnpLabs MediaExposer is a lightweight, framework-agnostic PHP library for exposing media files through a consistent interface. Pluggable exposers map media objects to public URLs, letting you serve images, video, and other assets from local storage or custom backends without tying app code to file p...
knplabs/media-exposer is a narrow, framework-agnostic PHP library for resolving media identifiers to paths/sources. It is not a media management platform, upload pipeline, transformation layer, or Laravel package. Laravel already provides stronger native primitives through Storage, Flysystem, Storage::url(), temporary URLs, and image-processing packages. The only credible fit is as an internal path-resolution abstraction when complex legacy resolution rules already exist.composer.json require, and does it conflict with Flysystem 3 or modern Symfony components? Is the package already used in a legacy application, or is this a new-adoption request? Does it enforce authorization or only path generation? Are generated URLs public, signed, or temporary? Is the resolution logic small enough to internalize behind a Laravel-native contract? Is there a maintained fork or replacement? What is the license and security-review status?TPM recommendation: Do not adopt for new Laravel builds. Treat it only as a legacy compatibility concern. If already present, isolate it behind an application-owned interface and plan replacement.
MediaPathResolver and bind the package behind that contract in a service provider. Run old and new resolvers in parallel for parity testing, then cut over by configuration and remove the package. For greenfield work, skip the package and implement a small internal resolver.How can I help you explore Laravel packages today?