mostafaznv/larupload
Larupload is a Laravel package that simplifies file uploads with Eloquent integration, handling images, videos and audio plus resizing, cropping, watermarking, validation, and local or S3 storage. It offers a clean API for attaching and managing media on models.
Architecture fit. Larupload is an ORM-centric uploader: media is attached to Eloquent models through a trait, with per-model attachment definitions (disk, naming, image sizes, video/audio handling) and metadata persisted alongside the row. That is a good fit for a conventional Laravel monolith or modular monolith where media is a property of a domain entity (user avatar, product image, article hero, course lesson video). It is a poor fit if we are moving toward a dedicated media service, event-sourced assets, or a polyglot stack — the package assumes Eloquent owns the file lifecycle. The dependency footprint is the real architectural decision: FFmpeg/FFprobe for video and audio, an image manipulation library for resizing, and Laravel's filesystem/Flysystem abstraction for storage. Those are all standard in a Laravel shop, but they convert a "composer require" into an infrastructure commitment.
Integration feasibility. Mechanically the package is easy to adopt: install via Composer, publish config and migrations, add a metadata column (typically JSON) to the target tables, declare attachments on the model, and read URLs/metadata through the attachment accessor. The work is not in wiring it up — it is in agreeing on the metadata schema, the disk layout, and where processing runs. Two feasibility gates to check early: (1) whether heavy transforms (video thumbnails, HLS/DASH conversion) can be dispatched to a queue rather than executed inline in the request, and (2) whether the storage driver support covers our target (local disk is a given; S3/object storage support should be confirmed against the version we pin, not assumed from the README).
Technical risk.
Key questions for engineering.
Stack fit. Strong if the stack is Laravel + MySQL/Postgres + Redis queues + local or S3-compatible storage, and if the product needs images plus occasional video/audio without standing up a media service. Weak if media is a first-class product surface (streaming platform, DAM, multi-CDN delivery) — in that case buy or build a dedicated pipeline and use Larupload only for simple image attachments, if at all.
Compatibility checks before committing.
composer.json constraints against our pinned Laravel/PHP, and conflicts with the image library version we already ship.Migration path. Treat it as a strangler-fig adoption, not a big bang:
MediaAttachment contract (upload, url, delete, metadata) implemented by the package. Every call site uses the contract. This is the single highest-leverage decision in the whole integration — it converts an unmaintained dependency into a replaceable adapter.Sequencing and dependencies. Infrastructure (FFmpeg binaries on app and worker images, queue capacity, storage bucket and lifecycle policy, CDN) must land before the pilot, not after. The backfill command must land before the first model is switched over. Feature-flag removal and legacy-code deletion should be tracked as explicit follow-up tickets or they will never happen.
Effort estimate. Roughly 1–2 weeks of one backend engineer for image-only adoption including the wrapper and pilot; 4–6 weeks if video/audio transcoding, queue infrastructure, and backfill at scale are in scope. Add review time for the security surface of file-serving routes.
Maintenance. Two maintenance streams, not one: the Composer package and the FFmpeg/OS-level media toolchain. Budget recurring time for dependency bumps, image-library major upgrades, and FFmpeg version pinning across environments. Because the package is small and single-maintainer, we should assume we may have to patch it ourselves; confirm that the MIT license and repository access make an internal fork practical, and identify now who owns that fork if it happens.
Support. Community-only — GitHub issues, no SLA, no vendor escalation path. For an internal tool that is acceptable; for anything customer-facing with media as a core feature, it is a gap. Mitigation is internal ownership: one named engineer accountable for the media pipeline, with the wrapper contract and a documented fork procedure as the safety net.
Scaling. The cost curve is dominated by transcoding, not by the package. Video/audio processing is CPU-bound and must run on dedicated queue workers with concurrency limits, timeouts, and retry budgets — never inline on web requests. Storage grows monotonically; define retention and derivative cleanup policy up front. For delivery, put object storage behind a CDN rather than serving bytes through PHP. Image resizing is comparatively cheap but still worth queueing above a size threshold.
Failure modes to instrument and alert on.
upload_max_filesize/post_max_size and proxy limits → align limits across nginx, PHP, and the app.Ramp-up. A Laravel developer is productive on image attachments in a day; video/audio with derivatives and streaming formats is closer to a week, mostly spent on FFmpeg and queue behavior rather than the package API. The documentation is the constraint — plan for the spike to produce internal notes, because tribal knowledge will otherwise concentrate in one person. Onboarding material should cover the wrapper contract, the disk layout, the backfill command, and the reconciliation job; those four artifacts are what make the integration survivable independent of the package's own future.
How can I help you explore Laravel packages today?