PHPackages                             digitalunited/du-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. digitalunited/du-responsive-images

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

digitalunited/du-responsive-images
==================================

Responsive Images for Developers

0.0.15(9y ago)54.0kMITPHPPHP &gt;=5.4

Since Mar 16Pushed 9y ago3 watchersCompare

[ Source](https://github.com/digitalunited/du-responsive-images)[ Packagist](https://packagist.org/packages/digitalunited/du-responsive-images)[ Docs](https://github.com/digitalunited/du-responsive-images)[ RSS](/packages/digitalunited-du-responsive-images/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (1)Versions (16)Used By (0)

Responsive Images for developers
================================

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

\##Why?!? TODO

\##How?!? TODO

\##Libs

-
-

\##Useage

```
\DigitalUnited\ResponsiveImage::render([
    'imgId' => $imgId,
    'output' => 'img'
    'ratio' => '4x3',
    'imgAttributes' => [
        'class' => [],
        'alt' =>  $alt,
    ],
    'wrapperAttributes' => [
        'class' => [],
    ],
    'divWithBgImageAttributes' => [
        'class' => ['cover']
    ]
]);
```

\##Options

### imgId

[](#imgid)

A WordPress attachment image id.

### Output (All is not implemented yet)

[](#output-all-is-not-implemented-yet)

- img: Regular img-tag (Not implemented, yet)
- img: Regular img wrapped in a div with kept aspect-ratio. The img behaves normal if the ratio setting is omitted.
- div: Div with srcset
- srcset: For usage in "data-srcset"-tag

### Ratio (Optional)

[](#ratio-optional)

The following aspect ratios are available.

- string "1x1"
- string "2x1"
- string "4x1"
- string "4x3"
- string "16x9"
- string "1x2"
- string "1x4"
- string "3x4"
- string "9x16"

### Ratio (Only valid when "output = img-ratio" or "output = img")

[](#ratio-only-valid-when-output--img-ratio-or-output--img)

### imgAttributes and wrapperAttributes (Only valid when "output = img")

[](#imgattributes-and-wrapperattributes-only-valid-when-output--img)

HTML attributes added to the wrapper-div and the img-tag when using img output mode

### divWithBgImageAttributes (Only valid when "output = div")

[](#divwithbgimageattributes-only-valid-when-output--div)

Output as div has 2 premade helper classes to avoid inline styling, "cover" and "contain".

\##TODO

- Caching of rendering
- Ratios with bootstrap breakpoints
- Use printplugin for Lazysizes

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~57 days

Recently: every ~153 days

Total

15

Last Release

3330d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/821855a31faf2328f84e9ca6cd52b483d3264a34cbc6949114200a49a2c438f5?d=identicon)[digitalunited](/maintainers/digitalunited)

---

Top Contributors

[![timcv](https://avatars.githubusercontent.com/u/1415514?v=4)](https://github.com/timcv "timcv (2 commits)")

---

Tags

pluginwordpressResponsive Images

### Embed Badge

![Health badge](/badges/digitalunited-du-responsive-images/health.svg)

```
[![Health](https://phpackages.com/badges/digitalunited-du-responsive-images/health.svg)](https://phpackages.com/packages/digitalunited-du-responsive-images)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[iceicetimmy/acf-post-type-selector

Post type selector for Advanced Custom Fields.

559.0k](/packages/iceicetimmy-acf-post-type-selector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
