PHPackages                             rllngr/kirby-thumbzer - 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. rllngr/kirby-thumbzer

ActiveKirby-plugin

rllngr/kirby-thumbzer
=====================

Kirby plugin — responsive srcset images with pre-generated thumbnails and ICC profile preservation

1.0.2(today)02↑2900%MITPHPPHP &gt;=8.0

Since Apr 3Pushed todayCompare

[ Source](https://github.com/RLLNGR/kirby-thumbzer)[ Packagist](https://packagist.org/packages/rllngr/kirby-thumbzer)[ RSS](/packages/rllngr-kirby-thumbzer/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

kirby-Thumbzer
==============

[](#kirby-thumbzer)

A Kirby CMS plugin that pre-generates thumbnails on file upload and renders responsive `` elements with srcset — including WebP conversion with optional ICC colour profile preservation. Part of the **rllngr** plugin set.

Features
--------

[](#features)

- Auto-generates resized thumbnails on `file.create`, `file.replace`, `file.changeName`, `file.delete`
- Renders responsive `` + `` + `` with named breakpoints
- WebP output with fallback to original format
- **ICC profile preservation** — uses ImageMagick directly (no `-strip`) for photography projects working in Adobe RGB or ProPhoto RGB
- Built-in Kirby route to serve thumbnail files from `/content/` (bypasses `.htaccess` block)
- Panel button on every image to open the **ICC comparison tool**
- Drop-in migration from per-project `define(THUMB_ROOT, ...)` + duplicated hooks

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

[](#requirements)

- Kirby 4+
- PHP 8.1+
- ImageMagick (`convert`) — required for ICC preservation, optional otherwise (falls back to Kirby's GD driver)

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

[](#installation)

**Via Composer** (recommended — installs automatically into `site/plugins/`):

```
composer require rllngr/kirby-thumbzer
```

**Manually** — clone or copy into `site/plugins/kirby-thumbzer`.

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

[](#configuration)

In `site/config/config.php`:

```
return [
    // Project prefix — prepended to every generated thumbnail filename
    // e.g. 'my-project-600-photo.webp'
    'thumbnails.prefix' => 'my-project-',

    // Named breakpoints used in the srcset and for the $breakpoint param
    'thumbnails.sizes' => [
        'small'       => 600,
        'medium'      => 1200,
        'large'       => 1800,
        'extra-large' => 2400,
    ],

    // Output format for generated thumbnails
    'thumbnails.format'  => 'webp',

    // Compression quality (0–100)
    'thumbnails.quality' => 90,

    // ── ICC profile preservation ──────────────────────────────────────────────
    // false (default) — Kirby's thumb driver, smallest file size, ICC stripped
    // true            — ImageMagick called directly without -strip, ICC embedded
    //                   Required for Adobe RGB / ProPhoto RGB photography projects
    'thumbnails.preserveICC' => false,

    // Path to the ImageMagick convert binary (only needed when preserveICC is true
    // or when using the 'im' driver)
    'thumbs' => [
        'driver' => 'im',
        'bin'    => '/usr/local/bin/convert',
    ],
];
```

### Migrating from `define(THUMB_ROOT, ...)`

[](#migrating-from-definethumb_root-)

Replace the constant definition with the config option — the plugin reads both as a fallback:

```
// Before (remove this)
define('THUMB_ROOT', 'my-project-');

// After
'thumbnails.prefix' => 'my-project-',
```

Then **remove** the `file.create:after`, `file.replace:after`, `file.changeName:after`, and `file.delete:after` hooks from `config.php` — the plugin registers them automatically.

Usage
-----

[](#usage)

### Snippet

[](#snippet)

```
