PHPackages                             tractorcow/silverstripe-image-formatter - 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. tractorcow/silverstripe-image-formatter

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

tractorcow/silverstripe-image-formatter
=======================================

Programatically convert image formats

2.0.1(2y ago)722.6k↑16.7%4[2 issues](https://github.com/tractorcow/silverstripe-image-formatter/issues)2BSD-3-ClausePHP

Since Apr 8Pushed 2y ago5 watchersCompare

[ Source](https://github.com/tractorcow/silverstripe-image-formatter)[ Packagist](https://packagist.org/packages/tractorcow/silverstripe-image-formatter)[ RSS](/packages/tractorcow-silverstripe-image-formatter/feed)WikiDiscussions 2 Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (6)Used By (2)

Image formatter module
======================

[](#image-formatter-module)

This module will let you transcode images on the fly in your templates.

Requirements
------------

[](#requirements)

- Silverstripe 5.2+

Installation Instructions
-------------------------

[](#installation-instructions)

- Install using composer

```
composer require tractorcow/silverstripe-image-formatter
```

Usage
-----

[](#usage)

```

    $HeaderImage.Format('webp').Fill(250, 250)

```

Conversions to `webp` and `avif` use a default quality setting of `75` and `50` respectively. You can update the quality used via config:

```
TractorCow\SilverStripeImageFormatter\ImageFormatExtension:
  default_quality: 80
  jpg_quality: 80
  webp_quality: 75
  avif_quality: 50
```

(The conversion documented [here](https://docs.silverstripe.org/en/5/developer_guides/files/file_manipulation/#converting-between-image-formats)leaves the quality of the generated images as is, which, at the standard quality of 90, results in larger images for webp and avif, which defeats the purpose of these formats.)

Disclaimer
----------

[](#disclaimer)

Prior to Silverstripe 5.2, this module did override some internal core behaviour in order to support image formatting. All formatted images were public by default!

Since Silverstripe 5.2 it uses an improved version of the [example from the documentation](https://docs.silverstripe.org/en/5/developer_guides/files/file_manipulation/#converting-between-image-formats)to convert images between formats.

License
-------

[](#license)

Copyright (c) 2021, Damian Mooyman

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- The name of Damian Mooyman may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~221 days

Recently: every ~84 days

Total

6

Last Release

761d ago

Major Versions

1.x-dev → 2.0.02024-04-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/f6a363b2d85dc3e82e73cc9e3a57fc15132920b166c5938ad63a54029b9f94b9?d=identicon)[tractorcow](/maintainers/tractorcow)

---

Top Contributors

[![tractorcow](https://avatars.githubusercontent.com/u/936064?v=4)](https://github.com/tractorcow "tractorcow (9 commits)")[![xini](https://avatars.githubusercontent.com/u/1152403?v=4)](https://github.com/xini "xini (3 commits)")

### Embed Badge

![Health badge](/badges/tractorcow-silverstripe-image-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/tractorcow-silverstripe-image-formatter/health.svg)](https://phpackages.com/packages/tractorcow-silverstripe-image-formatter)
```

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[imagekit/imagekit

PHP library for Imagekit

47795.6k9](/packages/imagekit-imagekit)[contao/image

Contao image library

131.7M9](/packages/contao-image)[intervention/image-driver-vips

libvips driver for Intervention Image

4495.5k6](/packages/intervention-image-driver-vips)

PHPackages © 2026

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