PHPackages                             bcairns/silverstripe-imageprofiles - 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. [Image &amp; Media](/categories/media)
4. /
5. bcairns/silverstripe-imageprofiles

ActiveSilverstripe-module[Image &amp; Media](/categories/media)

bcairns/silverstripe-imageprofiles
==================================

Allows image profiles to be defined in Config, then generate URLs for "lazy loading", on-demand image creation.

3503PHP

Since May 18Pushed 8y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

SilverStripe Image Profiles
===========================

[](#silverstripe-image-profiles)

Description
-----------

[](#description)

Normally, when using images in a template such as with: `$Image.SetWidth(200)`, this image is immediately resized (if needed) on the main page request. This can potentially make the page take a long time to load, or even timeout entirely, if there are lots of images that need to be processed.

This module tackles this by using pre-defined image profiles, and merely outputting URLs on the main page request (for images that may not exist yet). This means the main page request loads without delay, and then the images are generated on-demand via 404 handling of separate HTTP file requests (eg from `` tags). Generated images are cached in `assets/_profiles` for subsequent requests.

Usage
-----

[](#usage)

After installing the module, you can define profiles in config.yml:

```
ImageProfiles:
  profiles:
    Small:
      - SetWidth: 100
    Medium:
      - Quality: 95
      - SetWidth: 300
    Large:
      - SetWidth: 500
    PaddedRed:
      - SetWidth: 200
      - Pad: [200,200,'#f00']

```

Commands may be any normal Image manipulation methods, or the `Quality` keyword which will set the image quality for steps remaining in the current profile.

You can then use these profiles on any Image field:

```
$Image.Small    // output  tag
$Image.SmallURL // just get the URL

```

You can also use Profile and ProfileURL methods, with the profile name as the parameter:

```
$Image.Profile(Small)    // output  tag
$Image.ProfileURL(Small) // just get the URL

```

And finally, if you wish to output the original image, you can use Original and OriginalURL. This can be useful in conjunction with [AssetProxy](https://github.com/bcairns/silverstripe-assetproxy) to allow missing images to be fetched remotely.

```
$Image.Original    // output  tag
$Image.OriginalURL // just get the URL

```

Flushing
--------

[](#flushing)

When making any changes to the defined profiles, you must `flush` for new settings to take effect. This will also delete images in profiles that have changed.

Known Issues
------------

[](#known-issues)

- If the source image is changed (while retaining an identical filename) the profile versions won't be cleared and re-generated

Planned Improvements
--------------------

[](#planned-improvements)

- Allow default `_profiles` folder to be changed

Acknowledgements
----------------

[](#acknowledgements)

- This module is inspired by Drupal's image handling approach (which stems from the [ImageCache](https://www.drupal.org/project/imagecache) module).
- Big thanks to [unclecheese](https://github.com/unclecheese) for help getting magic methods working via an extension (see also [Zen Fields](https://github.com/unclecheese/silverstripe-zen-fields)).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/581411a15383c5e336fc3c7996a73dca59e088e3e0a8c53331465835041fa6b0?d=identicon)[bcairns](/maintainers/bcairns)

### Embed Badge

![Health badge](/badges/bcairns-silverstripe-imageprofiles/health.svg)

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

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)

PHPackages © 2026

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