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

Tiny Png Bundle Laravel Package

setono/tiny-png-bundle

A Symfony bundle that integrates the TinyPNG API to automatically compress and optimize PNG and JPEG images, helping reduce file sizes and improve page load performance with simple configuration.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Media/asset optimization roadmap item. This bundle is a thin Symfony integration for the TinyPNG/TinyJPG compression API. The product decision it enables is: do we compress user-uploaded and CMS-managed images automatically at ingest, and do we buy that capability or build it? It is the "buy, and integrate cheaply" branch of that decision.
  • Build vs. buy evaluation. TinyPNG gives you lossy PNG/JPEG compression (typically 50–70% size reduction) with no infrastructure to run. Alternatives to weigh: self-hosted tooling (libvips, ImageMagick, Squoosh CLI), or CDN-side optimization (Cloudflare Polish, imgix, Cloudinary). This package represents the lowest-effort, highest-vendor-dependency option.
  • Feature scope for a "media library" or "uploads" epic. Using it commits you to a synchronous-or-queued compress-on-upload step, which in turn drives decisions about job queues, original-vs-optimized file storage, and whether you keep uncompressed originals for re-processing.
  • Performance/Core Web Vitals prioritization. Image weight is a direct lever on LCP and page weight. Adopting this is a concrete, measurable SEO/performance initiative with a clean before/after metric (bytes served, LCP).
  • Cost modeling for the free tier. TinyPNG's free tier is ~500 compressions/month, then paid per-image. That threshold is a real product constraint: it determines whether you compress every upload or only "hero"/public-facing assets.
  • Not a Laravel decision. Flag this immediately: the brief frames a Laravel/PHP package, but this is a Symfony bundle. It is not usable in Laravel without forking the service wiring. If the codebase is Laravel, the analogous decision is a standalone TinyPNG client (e.g. tinify/tinify) wrapped in a queued job — this package is not the artifact to adopt.

When to Consider This Package

Consider it when:

  • The application is Symfony (not Laravel), and you want TinyPNG wired in with minimal code — the bundle handles service registration and configuration.
  • You have a low-to-moderate upload volume (comfortably inside or near the cheap paid tiers) and image compression is a "nice to have, ship it this sprint" task.
  • You already have (or are willing to take) a TinyPNG API key and accept a third-party dependency in the upload path.
  • You are on a currently supported Symfony/PHP combination. v1.1.0 is explicitly a Symfony-and-PHP compatibility refresh, which materially improves the odds that this works on a modern 6.x/7.x + PHP 8.2+ stack — but confirm the exact constraints in composer.json rather than trusting the release title.
  • You want an escape hatch: the wrapper is thin, so replacing it with a direct tinify/tinify call or a different provider is a contained refactor.

Look elsewhere when:

  • The stack is Laravel — wrong framework, full stop.
  • Volume is high. Per-image API pricing dominates at scale; self-hosted libvips/ImageMagick or CDN-side optimization wins on unit economics.
  • Maintenance risk tolerance is low. v1.1.0 is the first release since February 2022 — the dormancy is broken, but the package still shows 0 stars, 0 dependents, and a single outside contributor on a version-bump PR. Treat this as "revived, not proven": the version-constraint work is now current, but the bus factor and adoption signals are unchanged. Budget for vendoring or forking, and re-check the changelog before your next major framework upgrade.
  • You need modern formats (AVIF, WebP variants, responsive srcset generation). This bundle does compression, not format transcoding or responsive derivatives.
  • You need on-prem/air-gapped processing or have data-residency constraints on sending customer images to a third party.
  • You need synchronous guarantees or detailed observability — a thin API wrapper typically gives you limited retry/telemetry control; you'll build that yourself around a queue.

How to Pitch It (Stakeholders)

For executives: Images are usually the single largest contributor to page weight, and page weight drives load time, conversion, and search ranking. TinyPNG is a mature, low-cost SaaS that shrinks images by roughly half with no visible quality loss, and this bundle is a small piece of glue that connects it to our Symfony application. The integration cost is low — roughly a day of engineering plus queue setup — and the payoff is measurable in page-load metrics. Two caveats to acknowledge up front: (1) it is a paid, per-image service, so costs scale with upload volume and need a cap or policy; and (2) the open-source wrapper is a low-adoption project that sat dormant from 2022 until a recent compatibility release — that release is a good sign that it still builds against current Symfony and PHP, but it is a version bump, not a maintenance commitment. Plan to vendor it or replace it with a direct API client rather than depend on upstream. Net recommendation: pursue the capability, but treat this package as a starting point, not a strategic commitment.

For engineering: This is a thin Symfony DI wrapper around the TinyPNG HTTP API — service registration, config, and a compression call. It is not a full media pipeline. v1.1.0 bumps Symfony and PHP support, so it is worth re-testing against our target versions; read the actual diff/composer.json for the exact constraint ranges, since the release notes don't enumerate them. If it fits, that removes the main upgrade-blocker objection — but the decision of whether to depend on it or call tinify/tinify directly (nearly identical effort, one fewer low-adoption dependency) is still a judgment call, and it still doesn't change the framework mismatch. If we're on Laravel, disregard this package entirely and implement the same design with a direct client. Either way: run compression asynchronously on a queue, retain originals, and put a monthly call budget and failure/fallback path in place so a third-party outage never blocks an upload.

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.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle