PHPackages                             lingo/silverstripe\_respimage - 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. lingo/silverstripe\_respimage

ActiveSilverstripe-module

lingo/silverstripe\_respimage
=============================

Allows for easy use of responsive images (img.srcset) in SilverStripe

2.5.0(8y ago)2761MITPHPPHP ^5.3.3 || ^7.0

Since Jun 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/lingo/silverstripe_srcset)[ Packagist](https://packagist.org/packages/lingo/silverstripe_respimage)[ RSS](/packages/lingo-silverstripe-respimage/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (33)Used By (0)

SilverStripe Responsive Images
==============================

[](#silverstripe-responsive-images)

Easily use responsive images in SilverStripe templates, via the HTML5 `img`tag's `srcset` attribute.

Browser compatibility for this attribute can be seen here [caniuse](http://caniuse.com/#search=srcset), but in any case a [polyfill](https://github.com/aFarkas/respimage) is provided (use `npm install`) for older browsers.

See also [the full documentation](docs/en/index.md)

Installation
------------

[](#installation)

### Via composer

[](#via-composer)

```
composer require lingo/silverstripe_respimage
```

Usage
-----

[](#usage)

Simply call the `Responsive` method on your image. You should provide a media query as an argument. [See here](https://ericportis.com/posts/2014/srcset-sizes/) for explanation of this attribute.

```

	$FeaturedImage.Responsive("(max-width: 800px) 93vw, 45vw")

```

### CSS

[](#css)

You'll probably want to have a bit of CSS also set up to make images scale nicely, something like this:

```
img {
	width:  auto;
	height: 100%;
}
```

More information
----------------

[](#more-information)

You can also use the `.BackgroundAttr` method if you need to add an inline style attribute to an element, in order to use a responsive background image.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity69

Established project with proven stability

 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 ~17 days

Recently: every ~12 days

Total

31

Last Release

3104d ago

Major Versions

0.1.5 → 1.0.02017-06-06

1.0.1 → 2.0.02017-06-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/1913d335cc9a4281b75fa0b421b2385e8a6d01f94b90dd74228c2a7af8537e2f?d=identicon)[lingo](/maintainers/lingo)

---

Top Contributors

[![lingo](https://avatars.githubusercontent.com/u/219531?v=4)](https://github.com/lingo "lingo (44 commits)")

---

Tags

cssresponsive-imagessilverstripesrcset

### Embed Badge

![Health badge](/badges/lingo-silverstripe-respimage/health.svg)

```
[![Health](https://phpackages.com/badges/lingo-silverstripe-respimage/health.svg)](https://phpackages.com/packages/lingo-silverstripe-respimage)
```

###  Alternatives

[silverstripe-terraformers/gridfield-rich-filter-header

Rich filter header component for GridField

1325.7k1](/packages/silverstripe-terraformers-gridfield-rich-filter-header)[silverstripe/superglue

102.2k](/packages/silverstripe-superglue)

PHPackages © 2026

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