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
Responsive Image

Responsive Image Laravel Package

tempest/responsive-image

Generate responsive images in PHP and render the correct HTML. Define your source and public paths, create a factory, then output an img tag with a ready-made srcset of scaled sizes. Early work in progress, so expect changes.

View on GitHub
Deep Wiki
Context7

Server-side responsive images with PHP

Frequently asked questions about Responsive Image
Is tempest/responsive-image compatible with Laravel?
It is a Tempest package, not an official Laravel package. The README instantiates ResponsiveImageConfig and ResponsiveImageFactory directly, so it may work as a plain PHP library inside Laravel if those classes do not require Tempest's container. Verify transitive dependencies before adopting it.
How do I install tempest/responsive-image with Composer?
Run composer require tempest/responsive-image. Then create ResponsiveImageConfig with srcPath and publicPath and pass it to ResponsiveImageFactory. Check composer why tempest/responsive-image to see which Tempest support packages are pulled in.
How do I configure source and public image paths?
Construct ResponsiveImageConfig with srcPath pointing at your original images and publicPath pointing at the public output directory. The factory then creates dimension-named derivatives like parrot-1920-1280.jpg under publicPath. Keep source assets curated and paths stable.
Does tempest/responsive-image generate WebP or AVIF?
The documented example emits JPEG derivatives only, with a plain img tag and srcset. There is no picture element, type negotiation, or modern format strategy shown. You would need to extend the renderer for WebP and AVIF support.
Can I use tempest/responsive-image in a Blade template?
You can wrap ResponsiveImageFactory in a Blade directive or helper and output the image html property. Bind ResponsiveImageConfig as a Laravel singleton from config/images.php and inject the factory. Avoid calling create per request if generation is synchronous, and pre-generate at deploy time instead.
Are responsive images generated on every request?
The README example calls create and echoes html, which may perform GD or Imagick work inline on first hit. That risks blocking requests and stampedes on concurrent first hits. Pre-generate derivatives in an Artisan command or queue the work rather than generating on the rendering path.
What Laravel versions does tempest/responsive-image support?
There is no stated Laravel version support because this is not a Laravel package. Compatibility depends on whether its Tempest classes can be constructed outside the Tempest framework and on PHP version constraints. Run a dependency spike and test against your target Laravel and PHP versions.
How does cache invalidation work for generated responsive images?
Derivatives use dimension-encoded filenames such as parrot-1920-1280.jpg, with no visible content hash, manifest, or deletion story in the docs. Replacing a source image at the same path can leave stale derivatives served indefinitely. Changing configured widths can orphan old files, so add your own hashing and cleanup strategy.
Does tempest/responsive-image require the Tempest framework or container?
The quickstart constructs ResponsiveImageConfig and ResponsiveImageFactory directly, which suggests a plain PHP integration path. However, the package may pull Tempest support packages as transitive dependencies. Confirm with a bare PHP spike that the factory does not reach into Tempest's container, discovery, or config bootstrapping.
Is tempest/responsive-image maintained and safe for production?
The README labels it work in progress, and the assessment notes 1 star, 0 dependents, and a single-maintainer ecosystem. MIT licensing removes legal friction, but stewardship risk means you should plan to fork or vendor it. Do not put it on a critical rendering path without owning the code and pre-generating assets.
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