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

Image Optimizer Laravel Package

danihidayatx/image-optimizer

A fork of joshembling/image-optimizer for Filament v3, v4 and v5 and Laravel 10 through 13. It adds optimize and resize methods to FileUpload and SpatieMediaLibraryFileUpload, compressing and converting images before they reach your database or S3 bucket, saving disk space.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Cost Efficiency: Reduce storage costs (S3, database, or local storage) by eliminating redundant high-resolution originals, directly impacting cloud bills and infrastructure needs.
  • Performance Optimization: Faster page loads and reduced bandwidth usage by serving optimized images, improving user experience and SEO.
  • Developer Productivity: Accelerate development cycles by leveraging a pre-built solution for image optimization, avoiding custom implementations or third-party API integrations.
  • Roadmap Alignment: Supports a shift toward progressive enhancement in media handling—prioritizing optimized assets by default while preserving flexibility for edge cases (e.g., preserving originals for non-Filament workflows).
  • Build vs. Buy: Justifies a "buy" decision for teams lacking bandwidth to build/maintain a custom image optimization pipeline, especially if Filament is already in use.
  • Use Cases:
    • Media-heavy applications (e.g., e-commerce, portfolios, CMS platforms).
    • Projects where storage costs or performance are critical KPIs.
    • Teams adopting Filament v4/v5 and Laravel 12/13, needing seamless integration.

When to Consider This Package

  • Adopt if:

    • Your app uses Filament v4/v5 and Laravel 12/13 for admin panels or media uploads.
    • You store high-resolution originals unnecessarily (e.g., DSLR photos, unoptimized uploads).
    • Storage costs or performance are measurable pain points (e.g., S3 bills, slow asset delivery).
    • Your team lacks resources to implement custom image optimization (e.g., no dedicated DevOps or backend bandwidth).
    • You prioritize disk space savings over preserving originals (e.g., no need for "as-uploaded" archives).
  • Look elsewhere if:

    • You must retain originals for legal/compliance reasons (e.g., medical imaging, archival systems).
    • Your stack uses non-Filament upload components or older Laravel versions.
    • You need advanced features like AI-based optimization, dynamic format conversion (e.g., AVIF), or real-time resizing (consider spatie/image-optimizer or cloud-based tools like Cloudinary).
    • Your team prefers serverless solutions (e.g., AWS Lambda@Edge for on-the-fly optimization).
    • You’re already using a dedicated media library (e.g., Spatie Media Library) with built-in optimization.

How to Pitch It (Stakeholders)

For Executives/Business Leaders:

"This package lets us cut storage costs by up to 70% for image uploads in Filament by optimizing assets before they hit our database or S3 bucket. For a [X]-user app with [Y] monthly uploads, that’s a potential savings of [Z] per month—without sacrificing quality or performance. It’s a low-risk, high-reward tweak that aligns with our [cost-efficiency/performance] goals. Implementation is minimal (1–2 hours), and it plays nicely with our existing Laravel/Filament stack."

Key Ask:

  • Approval to evaluate as a quick win for storage/performance.
  • Budget for minor dev time (if not self-service).

For Engineering/Technical Stakeholders:

*"This is a drop-in replacement for Filament’s FileUpload that pre-optimizes images using Laravel’s built-in spatie/image-optimizer (same library as the original package). Here’s why it’s a no-brainer:

  • Zero breaking changes: Uses existing Filament components; just add two methods (optimize() and optimizeWithDynamicValues()).
  • Proven tech: Fork of a well-vetted package, updated for Filament v4/v5 and Laravel 12/13.
  • Performance gains: Smaller file sizes → faster loads → better Core Web Vitals.
  • Easy rollout: No API calls, no external dependencies—just install and configure.

Trade-offs:

  • Loses original uploads (but saves storage/bandwidth).
  • Limited to JPEG/PNG/WebP (no AVIF or advanced formats).

Proposal:

  • Pilot on a non-critical Filament panel to validate savings.
  • Pair with a storage cost audit to quantify impact.
  • Document the change for support teams (e.g., ‘optimized images may differ slightly from uploads’)."*

Key Ask:

  • Sign-off to replace FileUpload with the optimized version in 1–2 panels.
  • Collaboration with DevOps to monitor storage/performance metrics post-deploy.
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.
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support