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.
srcset, sizes, art direction) via the Picturefill approach, reducing client-side work and improving performance.Assets or Media Library) with responsive capabilities, reducing frontend boilerplate.srcset generation via {{ asset->responsiveImage() }} or similar helpers.asset:optimize or cron jobs) mitigates this.Assets) being replaced, or will this be an optional upgrade? What’s the rollout plan?srcset support) be handled? Is a polyfill (like Picturefill) required?asset:optimize).<picture>, <source>, <img>), working with any frontend framework (React, Vue, plain HTML).{{ asset->url }}).composer require spatie/statamic-responsive-images).Assets fieldtype with the new responsive fieldtype in a non-critical section.srcset loading).{{ asset->responsiveImage() }}).<img src="{{ asset->url }}">) in favor of responsive markup.asset:optimize or a custom Artisan command.statamic/asset-containers or statamic/medialibrary.<picture> elements). May require CSS adjustments for art-directed layouts.srcset paths.config/statamic/fields.php to include the new fieldtype.{{ asset->responsiveImage() }}).config/statamic/fields.php).srcset) can be debugged via Statamic’s logs or the package’s GitHub issues.laravel-medialibrary).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Package incompatibility with Statamic update | Broken image rendering | Test against Statamic pre-release versions; maintain a fork if needed. |
| Storage backend failures | Missing image variants | Use Statamic’s fallback asset handling; monitor storage health. |
| Dynamic generation overload | Slow page loads, timeouts | Implement pre-generation; rate-limit dynamic requests. |
Browser srcset unsupported |
Fallback images not displayed | Include polyfills (e.g., Picturefill) or graceful degradation (<img> fallback). |
| Cache invalidation issues | Stale image variants served | Configure proper cache headers; use cache tags for Statamic assets. |
Assets.How can I help you explore Laravel packages today?