Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Tinypng Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy at the integration layer. This package is not an image-optimization engine — it is a thin Symfony DI wrapper around the official 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.
  • Framework scope check before feature scoping. Despite being filed as a Laravel/PHP package, this is a Symfony bundle. In a Laravel codebase, 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."
  • Roadmap input for media and asset features. Useful signal when scoping payload reduction for faster page loads, lower CDN egress, smaller social-card/thumbnail assets, and upload-time compression. Warrants a 1–2 day spike to measure actual compression savings against your real asset mix before committing to a per-compression vendor contract.
  • Use cases it enables: batch or upload-time compression, thumbnail and OG-image shrinking, and static-asset build steps — all mediated by an external HTTP API, which means it introduces a network dependency into any path that calls it. That constrains where in the product it can safely run (queue or build step, never inline in a user request).
  • Low-confidence signal, explicitly. Zero stars, zero dependents, zero score: no production evidence, no issue history to mine for failure modes, no ecosystem pressure to keep it patched. That is a risk input to the roadmap, not a capability input.

When to Consider This Package

Adopt the bundle only if all of the following hold:

  • The target application is Symfony, on a major version the bundle's composer.json actually supports — verify before assuming Flex auto-configuration works.
  • You have already standardized on TinyPNG/TinyJPG as the compression vendor and want the client auto-wired through the container rather than hand-registered.
  • You accept an external HTTP dependency: every call is a network round-trip subject to vendor rate limits, monthly quota exhaustion, and outages. Compression must be pushed out of the synchronous request path regardless of which wrapper you choose.
  • You are willing to pin, vendor, or fork a near-abandoned bundle and own its upgrade path — including the Symfony-constraint churn that can block a framework upgrade.

Look elsewhere if:

  • You are on Laravel. Bind 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.
  • Volume or unit economics matter. TinyPNG bills per compression. For large catalogs, self-hosted encoders (mozjpeg, pngquant, libavif) have near-zero marginal cost and no network hop. Run your monthly image count against the plan tiers first.
  • Compression is on a critical path. Zero dependents means no bus factor, no security response process, no community testing. An unmaintained wrapper is a poor foundation for a durability-critical pipeline.
  • You need transformation features — crop, resize at scale, format negotiation, srcset generation. TinyPNG does compression plus a limited resize API; it is not an image transformation service. Pair it with a real transformation layer.

How to Pitch It (Stakeholders)

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."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums