folklore/laravel-image
A Laravel image package that simplifies common image workflows with a clean API for resizing, cropping, and generating thumbnails while integrating with Laravel’s filesystem and configuration. Useful for handling uploaded images and model attachments in apps.
immutable year-long caching on versioned URLs, ETag/304s, and correct responsive widths directly affect LCP/Core Web Vitals and image egress cost. This is the evidence needed to justify prioritizing an image-delivery workstream.image:doctor (driver/formats, FFI/libvips, disk read-write-delete, lock store, signing key, route session-cookie leakage, URL host) is a concrete pre-launch checklist item for release management.ImageSpec, UrlCodec, Signer, SourceResolver, Renderer, DerivativeStore) mean custom renderers or stores can be owned internally without forking.Image::fake() with an in-memory derivative store lets feature work proceed on the pipeline without real rendering in CI.Consider it when:
version_ttl), and you want one resolver for local and cloud sources.503 + Retry-After instead of thundering-herd load on origin.Image::fake(), image:doctor) before you commit engineering time.Look elsewhere or wait when:
2.0.0-alpha.1; it also depends on laravel-mediatheque 2 at its alpha and intervention/image >= 4.3.4. Two alpha dependencies in the critical path is a schedule risk, not a shipping plan.image:doctor helps, but the driver matrix is still yours to support.Recommended posture: pilot on a non-critical surface at alpha, plan the 1.x migration evaluation for beta, and gate GA adoption on a green image:doctor run in staging plus a documented PHP/Laravel upgrade path.
To executives: Image delivery is a measurable performance and cost line — page speed, SEO ranking, and CDN bandwidth. This package moves that capability in-house on infrastructure we already run (Laravel disks plus our CDN), with immutable caching and modern formats (WebP/AVIF) that cut bytes served. It also adds signed, expiring URLs so paid and private media ride the same pipeline instead of a bespoke proxy. The trade-off is timing: v2 is alpha, requires PHP 8.3+ and Laravel 12+, and pulls in two alpha-stage dependencies. Recommend funding a contained pilot now and committing to the upgrade at beta, not at GA.
To engineering: v2 is a clean rewrite around explicit contracts — ImageSpec, presets and their versions, UrlCodec/v2 URL syntax, Signer, SourceResolver, Renderer, DerivativeStore — each with contract-test traits, so custom implementations are supported rather than forked. The builder (Image::for($ref) → immutable PendingImage) gives presets, dimensions, fit/ratio, format, quality, signing, host, then url()/variant()/variants()/render(). Rendering is Intervention Image 4 with an auto driver (libvips → Imagick → GD), EXIF-uprighted, sRGB-converted, metadata-stripped. Delivery is a per-derivative lock with 503 + Retry-After, streaming or redirect, and correct Cache-Control/ETag/304 semantics. Config is split so you publish only what you change; signing keys derive from APP_KEY/APP_PREVIOUS_KEYS. Testing via Image::fake(), ops via image:doctor, CI is a full PHP × Laravel × driver matrix with Larastan at max.
To security/compliance: Signed URLs expire; private sources only ever get expiring signed URLs; strict mode forces signatures on free specs; limits are validated at URL-build time; the optional route checks signature and expiry (403) and, per image:doctor, flags whether it sets session cookies. Derivative metadata is stripped and color normalized — both privacy-positive defaults.
Risks to socialize: alpha status and alpha-pinned dependencies; a breaking jump with no 1.x compatibility layer until beta; PHP 8.3/Laravel 12 as a prerequisite that may itself be an unplanned program of work; and the operational surface of the driver stack (libvips/FFI/Imagick) that the team now owns.
How can I help you explore Laravel packages today?