imsus/laravel-imgproxy
imsus/laravel-imgproxy provides a Laravel wrapper for imgproxy, letting you generate secure signed image URLs with configurable presets, resizing, and optimization options for serving responsive, optimized images in your app.
cover(), fit(), orient(), flipVertically(), flipHorizontally(), toWebp(), toJpg(), toPng(), toAvif(), optimize(), storePublicly()) let product and engineering scope common image requirements in domain terms rather than imgproxy wire options. This shortens discovery and reduces coupling between product specs and low-level processing syntax.toWebp(), toAvif(), and optimize(?format, q = 70) directly support performance and format-modernisation roadmaps. PMs can plan WebP/AVIF rollouts, quality budgets, and responsive-image work with less engineering translation.Imgproxy::fromStorage(path, disk, ?instance) and storePublicly(disk, path, options) make disk-based sources and public visibility first-class. This helps decide how product surfaces handle public vs private media, pre-signed URLs, and storage workflows.Conditionable trait (when() / unless()) supports product rules such as “optimise only non-GIF uploads” or “apply format conversion only when the source is eligible,” keeping conditional image logic readable.resize() usage in place; resize() is docblock-deprecated only, so migration can be scheduled rather than forced.contain(), scale(), coordinate crop(), grayscale(), storePubliclyAs) and the contain composition in advanced usage clarify what is intentionally not abstracted. PMs should not promise CSS-like contain/scale as first-class API without confirming the advanced composition or withOption() escape hatch.contain, scale, coordinate-based crop, or grayscale—unless you are comfortable using the documented withOption() escape hatch or advanced composition patterns.resize() usage: runtime is unchanged, but the docblock deprecation signals a future naming discussion. Plan to prefer cover() / fit() for new work and schedule cleanup only when the team is ready.For executives: This release makes the Laravel imgproxy package easier to use for common product image needs—cropping, fitting, orientation, flips, modern format conversion, optimisation, and public storage. It is additive on 2.x with no BC break, so it reduces delivery risk while accelerating image-heavy features. It supports build-vs-buy decisions by lowering the cost of using imgproxy instead of building custom image processing, and it aligns with performance and format-modernisation goals such as WebP/AVIF and quality tuning.
For engineering: v2.2.0 adds a thin intent-method layer over the existing immutable builder. Methods like cover(), fit(), orient(), flipVertically(), flipHorizontally(), toWebp(), toJpg(), toPng(), toAvif(), optimize(), and storePublicly() compile down to existing processing-option segments; the typed option layer and withOption() remain the precise escape hatch. New entry points fromStorage(), fromPath(), and fromUrl() clarify source handling, and Conditionable supports conditional transform chains. resize() is docblock-deprecated only, with runtime unchanged. The documented non-goals and ADR make the layering and naming policy explicit, so teams can adopt intent methods for new work without a forced migration.
How can I help you explore Laravel packages today?