loevgaard/tinypng-bundle
Symfony bundle that integrates the TinyPNG/TinyJPG API to compress PNG and JPEG images, cutting file sizes while preserving visual quality. Configure your API key and optimize images through a simple service, with support for local files and remote URLs.
tinify/tinify PHP client. The real buy decision is TinyPNG/TinyJPG as a vendor (metered compressions, 500 free/month); the wrapper is glue you could reproduce in roughly 30 lines of container configuration. Treat it as evidence that image compression belongs on the roadmap, not as a dependency decision in itself.bundles.php, Configuration, and Extension classes are inert — there is no registration mechanism to hook into. So it supports a framework decision, not a Laravel feature decision. If your stack is Symfony (or a Symfony admin service sits in the estate), it becomes a legitimate shortcut; if you are Laravel-only, it is a non-option and the decision collapses to "adopt the tinify/tinify SDK directly."Adopt the bundle only if all of the following hold:
composer.json actually supports — verify before assuming Flex auto-configuration works.Look elsewhere if:
tinify/tinify behind a service provider (~1 day including an ImageOptimizer interface and a queued job), or evaluate spatie/image-optimizer, which bundles a Tinify optimizer alongside local encoders. Do not pull a Symfony bundle into Laravel to solve a 30-line wiring problem.srcset generation. TinyPNG does compression plus a limited resize API; it is not an image transformation service. Pair it with a real transformation layer.To executives: This is not a platform decision. It is a small integration shim for one vendor (TinyPNG/TinyJPG) on one framework (Symfony) — and it does not even apply to our Laravel codebase, which has no bundle registration mechanism. The strategic decision is the vendor relationship and its per-image pricing; the wrapper is replaceable in a day. My recommendation is not to adopt the bundle as a dependency: it has zero traction, no dependents, and no visible maintenance, and we can replicate its behavior ourselves with a handful of container lines — which leaves us owning the code that touches our image pipeline rather than inheriting an unmaintained one.
To engineering: The asset is the tinify/tinify SDK; the bundle is registration and config sugar. If we go with TinyPNG, wire the SDK directly — a services.yaml entry plus an API-key parameter on Symfony, a service provider exposing an ImageOptimizer interface on Laravel. Keep all compression asynchronous behind a queue so vendor latency and quota errors never surface in a user request; cache by content hash so we never re-bill the same image; enforce backpressure below the rate limit so a worker herd doesn't burn the quota; and add a hard kill-switch that degrades to "serve the original" during an outage. Document the failure taxonomy (401 invalid key, 429 quota, 4xx corrupt source, 5xx/timeout retryable) and monitor the Compression-Count header with an alert at 80%. Budget check: the free tier is 500 compressions/month — measure real volume before calling it free.
Ask: Approve a short spike (≤2 days) to quantify compression savings on a representative asset sample and compare TinyPNG's cost against self-hosted encoders. Decide the vendor on those numbers; the wrapper decision then follows trivially — for a Laravel app, it is "use the SDK, skip the bundle."
How can I help you explore Laravel packages today?