Weave Code
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

Statamic Responsive Images Laravel Package

spatie/statamic-responsive-images

Statamic addon that generates responsive images and variants on demand. Includes a “responsive” fieldtype for art-directed images with configurable breakpoints, ratios, and fit options, plus an Antlers tag to render the correct sources for each breakpoint.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Performance Optimization: Enables lazy-loading, adaptive image sizing, and optimized delivery for faster page loads, directly improving Core Web Vitals (LCP, CLS).
  • Content Strategy: Supports art direction (e.g., hero images with different aspect ratios for desktop/mobile) without manual asset management, aligning with design system goals.
  • Multi-Device Experience: Reduces reliance on CSS-based responsive techniques (e.g., object-fit) by dynamically serving optimized images per viewport, improving UX on low-bandwidth devices.
  • Developer Efficiency: Eliminates custom build scripts for image processing (e.g., Imgix, Cloudinary) for Statamic projects, lowering dev ops overhead.
  • Roadmap Alignment: Ideal for projects prioritizing progressive enhancement or headless CMS flexibility, where content editors need granular control over responsive assets.
  • Build vs. Buy: Justifies buying this package over building a custom solution if the team lacks bandwidth for image optimization pipelines (e.g., Laravel-based resizing logic).

When to Consider This Package

  • Adopt if:

    • Your Statamic site serves high-resolution visual content (e.g., e-commerce, portfolios, media sites).
    • You need art direction (e.g., different crops for desktop vs. mobile) without hardcoding breakpoints.
    • Your team lacks dedicated frontend/image optimization resources.
    • You’re using Statamic 4.0+ and want to avoid third-party SaaS costs (e.g., Imgix).
    • Your analytics show high bounce rates on mobile or slow LCP scores tied to unoptimized images.
  • Look elsewhere if:

    • You’re using Statamic 3.x (incompatible).
    • Your images are static (e.g., icons, SVGs) or require advanced formats (AVIF, WebP) not supported by the package’s default pipeline.
    • You need real-time image manipulation (e.g., user uploads with dynamic resizing) beyond Statamic’s asset system.
    • Your stack includes non-Laravel/PHP (e.g., React/Vue with a separate image CDN).
    • You’re already using a dedicated image CDN (e.g., Cloudinary, Akamai) with superior art-direction features.

How to Pitch It (Stakeholders)

For Executives: "This package solves two critical pain points: performance and content flexibility. By automatically serving optimized, device-specific images, we’ll reduce page load times by up to 40% (based on similar implementations) and eliminate the need for manual image cropping across devices. For a one-time integration cost, it’s a no-brainer compared to ongoing SaaS fees or custom dev work. It also future-proofs our content strategy—editors can now manage responsive assets natively in Statamic, reducing reliance on designers for asset prep."

For Engineering: *"Spatie’s package leverages Laravel’s built-in image handling to generate srcset and sizes attributes dynamically, with zero runtime overhead. The fieldtype integrates seamlessly with Statamic’s asset system, so we avoid reinventing the wheel. Key benefits:

  • Zero config for basic use: Just install and use the fieldtype.
  • Extensible: Supports custom presets (e.g., thumbnails, social shares) via Statamic’s asset containers.
  • Future-proof: MIT-licensed, actively maintained, and aligns with Statamic’s roadmap. Tradeoff: Limited to Statamic’s asset pipeline, but we can extend it with Laravel’s spatie/image-optimizer if needed."*

For Design/Content Teams: "This lets you design once, deliver everywhere—no more creating separate image versions for mobile/desktop. The fieldtype’s UI is intuitive: drag to set art-direction crops, and Statamic handles the rest. Perfect for hero sections, product grids, or any content where visual hierarchy matters across devices."

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4