PHPackages                             cita/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. [Templating &amp; Views](/categories/templating)
4. /
5. cita/silverstripe-picture

ActiveSilverstripe-vendormodule[Templating &amp; Views](/categories/templating)

cita/silverstripe-picture
=========================

CitaNZ's SilverStripe picture object and field for SilverStripe 4

1.0.7(4y ago)08431MITPHP

Since Jun 5Pushed 4y ago4 watchersCompare

[ Source](https://github.com/CITANZ/silverstripe-picture)[ Packagist](https://packagist.org/packages/cita/silverstripe-picture)[ Docs](https://github.com/CITANZ/silverstripe-picture)[ RSS](/packages/cita-silverstripe-picture/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

CITANZ's SilverStripe Picture object and field
==============================================

[](#citanzs-silverstripe-picture-object-and-field)

The object that allows the users to upload 3 images for 3 different breakpoints: mobile, tablet and desktop, and also accepts the dimension settings for each individual images.

For more details... read the code yourself?

### Usage

[](#usage)

1. Install

```
composer require cita/silverstripe-picture

```

2. `/dev/build?flush=all`
3. Sample code:

```
...
use Cita\Model\Picture;
use Cita\FormField\PictureField;
...

private static $has_one = [
    'Picture' => Picture::class,
];

private static $many_many = [
    'Pictures' => Picture::class,
];

...

public function getCMSFields()
{
    $fields = parent::getCMSFields();

    $fields->addFieldToTab(
        'Root.Main',
        PictureField::create('Picture', 'Picture', $this)
            ->setFolderName('ContentPictures')
            ->setDimensions([
                'Desktop' => [
                    'Width' => 320,
                    'Height' => 320,
                ],
                'Tablet' => [
                    'Width' => 240,
                    'Height' => 240,
                ],
                'Phone' => [
                    'Width' => 120,
                    'Height' => 120,
                ],
            ])
    );

    $fields->addFieldToTab(
        'Root.Pictures',
        PictureField::create('Pictures', 'Pictures', $this)
            ->setFolderName('content')
            ->setDimensions([
                'Desktop' => [
                    'Width' => 320,
                    'Height' => 320,
                ],
                'Tablet' => [
                    'Width' => 240,
                    'Height' => 240,
                ],
                'Phone' => [
                    'Width' => 120,
                    'Height' => 120,
                ],
            ])
    );

    return $fields;
}

```

4. output on the template (based on the $has\_one relation in the example in step 3)

`$Picture`

---

### Advanced useage: adding additional fields

[](#advanced-useage-adding-additional-fields)

```
...
use SilverStripe\Forms\OptionsetField;
...
private static array $has_one = [
    Image::class,
];
...
$fields->addFieldToTab(
    'Root.Pictures',
    $pictureField = PictureField::create('Image', 'Image', $this)
        ->setFolderName('content')
        ->setAdditionalDBFields(['PictureHolderStyle'])
        ->setDimensions([
            'Desktop' => [
                'Width' => 320,
                'Height' => 320,
            ],
            'Tablet' => [
                'Width' => 240,
                'Height' => 240,
            ],
            'Phone' => [
                'Width' => 120,
                'Height' => 120,
            ],
        ])
);

$pictureField->insertBefore(
    'RemovePictureButton',
    OptionsetField::create(
        'PictureHolderStyle',
        'Image theme',
        PictureExtension::PictureHolderStyles,
        $this->Image()->PictureHolderStyle
    )
);

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

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

Total

3

Last Release

1582d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0395e460ef8e7579fc3f6e426d16bd0fed2b54de4ef5611d49494b0d6ee240be?d=identicon)[leochenftw](/maintainers/leochenftw)

---

Top Contributors

[![leochenftw](https://avatars.githubusercontent.com/u/8662044?v=4)](https://github.com/leochenftw "leochenftw (13 commits)")

---

Tags

silverstripe picture fieldsilverstripe picture object

### Embed Badge

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

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

###  Alternatives

[silverstripe-themes/simple

The SilverStripe simple theme (default SilverStripe 3 theme)

411.3M8](/packages/silverstripe-themes-simple)[silverstripe/login-forms

A collection of templates for the CMS login screens

191.3M26](/packages/silverstripe-login-forms)[stevie-mayhew/silverstripe-svg

Basic SVG support for SilverStripe

23326.5k4](/packages/stevie-mayhew-silverstripe-svg)[rywa/silverstripe-foundation

Foundation 5 Prototyping Theme for SilverStripe

392.6k](/packages/rywa-silverstripe-foundation)[symbiote/silverstripe-listingpage

A module that allows CMS users to create templated listing pages.

1012.7k2](/packages/symbiote-silverstripe-listingpage)[axllent/silverstripe-tiled-gridfield

Inline/tiled images in a Silverstripe GridField table

163.2k](/packages/axllent-silverstripe-tiled-gridfield)

PHPackages © 2026

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