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

ActiveLibrary

octosqueeze/octosqueeze-silverstripe
====================================

OctoSqueeze Silverstripe module

0113PHP

Since Mar 29Pushed 1mo ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

OctoSqueeze for SilverStripe
============================

[](#octosqueeze-for-silverstripe)

Automatic image compression and WebP/AVIF conversion for SilverStripe CMS.

Features
--------

[](#features)

- Automatic compression of uploaded images
- WebP and AVIF format conversion
- Browser-based format detection (serves best format based on browser support)
- Tracks all image variants (thumbnails, resized images)
- Admin panel for viewing compression statistics
- Queue-based compression via scheduled tasks

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

[](#requirements)

- PHP 8.0+
- SilverStripe Framework 5.0+
- OctoSqueeze API key ([Get one free](https://octosqueeze.com))

Installation
------------

[](#installation)

```
composer require octosqueeze/octosqueeze-silverstripe
```

Configuration
-------------

[](#configuration)

Add your API key to your `.env` file:

```
OCTOSQUEEZE_API_KEY="your-api-key-here"

# Optional: For local development
OCTOSQUEEZE_DEV_ENV=true
OCTOSQUEEZE_ENDPOINT="https://your-local-api.test"
```

### Module Configuration

[](#module-configuration)

Create or edit `app/_config/octosqueeze.yml`:

```
OctoSqueeze\Silverstripe\Octo:
  # Auto-replace image URLs with WebP/AVIF versions (recommended)
  autoreplace_url: true

  # Also replace URLs in admin panel
  autoreplace_url_in_admin: false

  # Formats to generate (in addition to original)
  required_formats:
    - avif
    - webp

  # Compression mode: 'size' (smallest), 'balanced', or 'quality' (best quality)
  oc_compression_type: balanced
```

Usage
-----

[](#usage)

### Automatic Compression

[](#automatic-compression)

Once installed and configured, OctoSqueeze automatically:

1. Tracks all image uploads and their variants
2. Compresses images via scheduled tasks
3. Serves optimized formats based on browser support

### Running Compression Tasks

[](#running-compression-tasks)

Add these to your cron jobs:

```
# Send images for compression (run frequently)
php vendor/silverstripe/framework/cli-script.php dev/tasks/OSSendConversionsTask

# Fetch completed compressions
php vendor/silverstripe/framework/cli-script.php dev/tasks/OSFetchCompressionsTask
```

Or run manually from `/dev/tasks` in your browser.

### Template Usage

[](#template-usage)

Images automatically serve the best format. No template changes needed:

```

$Image.ScaleWidth(800)
```

To prevent format conversion for specific images:

```
$Image.OctoIgnore.ScaleWidth(800)
$Image.OctoIgnore('webp').ScaleWidth(800)
$Image.OctoIgnore('avif').ScaleWidth(800)
```

### Admin Panel

[](#admin-panel)

View compression statistics in the CMS at **OctoSqueeze** in the main menu.

Available Tasks
---------------

[](#available-tasks)

TaskDescription`OSSendConversionsTask`Send pending images to OctoSqueeze for compression`OSFetchCompressionsTask`Download completed compressions`PopulateConversionsTask`Scan existing images and create conversion records`GenerateThumbnailsTask`Pre-generate common thumbnail sizes`EraseOSTask`Clear all OctoSqueeze compression data`EraseBrokenImagesTask`Clean up orphaned compression recordsHow It Works
------------

[](#how-it-works)

1. **Upload**: When an image is uploaded, OctoSqueeze creates a conversion record
2. **Publish**: On publish, all image variants are tracked
3. **Compress**: Scheduled task sends images to OctoSqueeze API
4. **Store**: Compressed images (WebP, AVIF) are saved alongside originals
5. **Serve**: Browser detection serves the best supported format

License
-------

[](#license)

MIT License. See [LICENSE.md](LICENSE.md) for details.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance60

Regular maintenance activity

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity11

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/760e9e0951553fd63640108d46b90adc3b37cdcd3b0d23e5c5acbfb2783491ba?d=identicon)[octosqueeze](/maintainers/octosqueeze)

---

Top Contributors

[![octosqueeze](https://avatars.githubusercontent.com/u/156412546?v=4)](https://github.com/octosqueeze "octosqueeze (17 commits)")

### Embed Badge

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

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

PHPackages © 2026

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