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 3w ago

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 47% 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

1633d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8662044?v=4)[Leo Chen](/maintainers/leochenftw)[@leochenftw](https://github.com/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/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1371.1M85](/packages/silverstripe-userforms)[silverstripe/cms

The SilverStripe Content Management System

5253.6M1.4k](/packages/silverstripe-cms)[dnadesign/silverstripe-elemental

Elemental pagetype and collection of Elements

1101.1M308](/packages/dnadesign-silverstripe-elemental)[silverstripe/login-forms

A collection of templates for the CMS login screens

191.4M30](/packages/silverstripe-login-forms)[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

91437.9k29](/packages/tractorcow-silverstripe-fluent)[silverstripe-themes/simple

The SilverStripe simple theme (default SilverStripe 3 theme)

411.3M8](/packages/silverstripe-themes-simple)

PHPackages © 2026

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