PHPackages                             fronty/responsive-images - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. fronty/responsive-images

ActiveLibrary[Image &amp; Media](/categories/media)

fronty/responsive-images
========================

Library that will make working with images in your responsive Wordpress template a breeze.

v0.30(1mo ago)3149MITPHPPHP &gt;=8.2

Since Jun 23Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/frontycore/responsive-images)[ Packagist](https://packagist.org/packages/fronty/responsive-images)[ RSS](/packages/fronty-responsive-images/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (6)Versions (32)Used By (0)

RESPONSIVE IMAGES FOR WORDPRESS
===============================

[](#responsive-images-for-wordpress)

Library that will make working with images in your responsive Wordpress template a breeze.

**What's in the box:**

- Generates &lt;img&gt; tags with precise `srcset` and `sizes` attributes for images from WP Media Library.
- Generates &lt;img&gt; tags wrapped in aspect-ratio preserving wrapper for both WP Media images and theme images. Great to prevent CLS with lazyloaded images.
- Clean API to define responsive image sizes in either mobile-first (min-width) or desktop-first (max-width) manner.
- Helper to define images sizes based on taken colums in Bootstrap grid for each breakpoint.
- Replace responsive image in Gutenberg image block.
- Generates sanitized and minified &lt;svg&gt; code, which can be safely inlined to HTML.

**Code**

```
