PHPackages                             kinglozzer/silverstripe-picture - 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. kinglozzer/silverstripe-picture

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

kinglozzer/silverstripe-picture
===============================

A module to add &lt;picture&gt; support to Silverstripe

3.0.1(3mo ago)43.6k3[1 PRs](https://github.com/lozcalver/silverstripe-picture/pulls)1BSD-3-ClausePHPPHP ^8

Since Apr 10Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/lozcalver/silverstripe-picture)[ Packagist](https://packagist.org/packages/kinglozzer/silverstripe-picture)[ RSS](/packages/kinglozzer-silverstripe-picture/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (17)Used By (1)

Silverstripe Picture
====================

[](#silverstripe-picture)

Easy `` element generation for Silverstripe images.

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

[](#installation)

```
composer require kinglozzer/silverstripe-picture
```

Usage
-----

[](#usage)

Configuration is performed via YAML:

```
Kinglozzer\SilverstripePicture\Picture:
  styles:
    Carousel:
      default:
        - {method: 'Fill', arguments: [375, 250]}
        - {method: 'Fill', arguments: [750, 500], descriptor: 750w}
      sources:
        "(min-width: 1024px)":
          - {method: 'Fill', arguments: [1024, 450]}
          - {method: 'Fill', arguments: [2048, 900], descriptor: 2x}
```

Each style can then be called from templates:

```

    {$Image.Carousel}

```

The generated HTML will look like this:

```

```

Full example
------------

[](#full-example)

Each source (and the “default” image) consists of one or more srcset image candidates, and each candidate consists of one or more manipulations and an optional descriptor (e.g. `2x`, `300w`).

```
Kinglozzer\SilverstripePicture\Picture:
  styles:
    Carousel:
      # The default  that’s rendered if none of the  medias are matched
      default:
        # A list of image candidates to be output in the srcset attribute on the  tag
        - {method: 'Fill', arguments: [200, 150]} # The first candidate will also be used as the  "src"
        - {method: 'Fill', arguments: [400, 300], descriptor: 400w}
      # A list representing the  tags
      sources:
        "(min-width: 1128px)": # The "media" attribute for the source
          # A list of srcset image candidates
          - {method: 'Fill', arguments: [1024, 450]}
          - {method: 'Fill', arguments: [2048, 900], descriptor: 2x}
        "(min-width: 768px)":
          # If required, each srcset candidate can perform multiple manipulations
          -
            manipulations:
              - {method: 'ScaleWidth', arguments: [50]}
              - {method: 'Pad', arguments: [50, 100, 'FFFFFF']}
          -
            manipulations:
              - {method: 'ScaleWidth', arguments: [100]}
              - {method: 'Pad', arguments: [100, 200, 'FFFFFF']}
            descriptor: 2x
```

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance78

Regular maintenance activity

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

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

Recently: every ~226 days

Total

16

Last Release

113d ago

Major Versions

1.x-dev → 2.0.02023-07-28

2.x-dev → 3.0.02025-08-20

PHP version history (2 changes)1.0.0PHP ^7.4 || ^8.0

3.0.0PHP ^8

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/203294386?v=4)[-&gt; lozcalver](/maintainers/kinglozzer)[@kinglozzer](https://github.com/kinglozzer)

---

Top Contributors

[![lozcalver](https://avatars.githubusercontent.com/u/1655548?v=4)](https://github.com/lozcalver "lozcalver (15 commits)")

### Embed Badge

![Health badge](/badges/kinglozzer-silverstripe-picture/health.svg)

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

###  Alternatives

[silverstripe/blog

A fresh take on blogging in Silverstripe set out to tackle the issue of a cluttered Site Tree.

104739.2k31](/packages/silverstripe-blog)[silverstripers/seo

SEO for SilverStripe websites

1144.3k](/packages/silverstripers-seo)[bigfork/htmleditorsrcset

Simple srcset integration with SilverStripe’s HTMLEditorField

1025.4k4](/packages/bigfork-htmleditorsrcset)[silverstripe/multi-domain

Allows multiple domains to access one CMS instance, mapping them to different sections of the hierarchy

141.6k](/packages/silverstripe-multi-domain)

PHPackages © 2026

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