PHPackages                             arillo/silverstripe-shortpixel - 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. arillo/silverstripe-shortpixel

ActiveSilverstripe-vendormodule

arillo/silverstripe-shortpixel
==============================

Shortpixel integration for SilverStripe CMS.

04PHP

Since Sep 26Pushed 6y ago2 watchersCompare

[ Source](https://github.com/arillo/silverstripe-shortpixel)[ Packagist](https://packagist.org/packages/arillo/silverstripe-shortpixel)[ RSS](/packages/arillo-silverstripe-shortpixel/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Silverstripe Shortpixel
=======================

[](#silverstripe-shortpixel)

[![Latest Stable Version](https://camo.githubusercontent.com/ed405020b49e31a6287793354644ae988e983218607ca3b08d59bab7f64b9193/68747470733a2f2f706f7365722e707567782e6f72672f6172696c6c6f2f73696c7665727374726970652d73686f7274706978656c2f762f737461626c65)](https://packagist.org/packages/arillo/silverstripe-shortpixel)[![Total Downloads](https://camo.githubusercontent.com/04b81b7a303f67b0d003651474b244bb42065f46949bede3eea98b7e9c09bc70/68747470733a2f2f706f7365722e707567782e6f72672f6172696c6c6f2f73696c7665727374726970652d73686f7274706978656c2f646f776e6c6f616473)](https://packagist.org/packages/arillo/silverstripe-shortpixel)[![License](https://camo.githubusercontent.com/48ff7ca491a5f881c72a4895898a9eeeea7aa73f603ec0e703f7a4751ab67bf2/68747470733a2f2f706f7365722e707567782e6f72672f6172696c6c6f2f73696c7665727374726970652d73686f7274706978656c2f6c6963656e7365)](https://packagist.org/packages/arillo/silverstripe-shortpixel)

**CAUTION: work in progress, do not use in production!**

It will gradually optimze all images in a given folder (e.g. assets folder) via [shortpixel api](https://shortpixel.com) . Purposed to run via cronjob.

Adds a Shortpixel-Tab to your `SiteConfig`, where you can switch off task execution and where you can find api status information.

Setup
-----

[](#setup)

Get a shortpixel api key and set it in your `.env`:

```
SP_APIKEY=""

```

Configuration file (e.g. shortpixel.yml):

```
---
Name: myshortpixelconfig
After:
  - '#shortpixelconfig'
---
Arillo\Shortpixel\Shortpixel:
  # all option in: ShortPixel\ShortPixel::$options
  options:
    lossy: 0 # 1 - lossy, 2 - glossy, 0 - lossless

Arillo\Shortpixel\Tasks\FolderTask:
  exclude_folders:
    - '.protected' # omit .protected, default nothing

  # configure ShortPixel
  shortpixel_settings:
    max_allowed_files_per_call: 5 # default: 10
    client_max_body_size: 20 # default: 48
    wait: 300 # default: 500

  # you can turn off auto file re-hashing, if you want to.
  # plays nice with beforeShortPixelCall and afterShortPixelCall hooks, to create your own recovery strategy
  use_simple_image_recovering: false # default true

  # optionally you can set the root folder
  root_folder:  # default ASSETS_PATH

```

Setup an cronjob to execute the task:

```
*/1 * * * * php vendor/silverstripe/framework/cli-script.php dev/tasks/ShortpixelFolderTask

```

You might need to play around with cronjob timing and `shortpixel_settings` to avoid multiple overlapping executions.

Find more information about options &amp; settings in `Arillo\Shortpixel\Tasks\FolderTask`.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/71205042f233fccd5882cdbd033b8de8f3062acbed2b19c5b16e07ccd4e2208e?d=identicon)[Arillo](/maintainers/Arillo)

---

Top Contributors

[![bumbus](https://avatars.githubusercontent.com/u/1391103?v=4)](https://github.com/bumbus "bumbus (19 commits)")

### Embed Badge

![Health badge](/badges/arillo-silverstripe-shortpixel/health.svg)

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

PHPackages © 2026

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