PHPackages                             bnomei/kirby3-thumb-imageoptim - 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. bnomei/kirby3-thumb-imageoptim

AbandonedArchivedKirby-plugin[Image &amp; Media](/categories/media)

bnomei/kirby3-thumb-imageoptim
==============================

Kirby 3 Thumb Driver using Imageoptim

2.0.2(4y ago)7350[3 PRs](https://github.com/bnomei/kirby3-thumb-imageoptim/pulls)MITPHPPHP &gt;=7.2.0

Since Jul 26Pushed 3y agoCompare

[ Source](https://github.com/bnomei/kirby3-thumb-imageoptim)[ Packagist](https://packagist.org/packages/bnomei/kirby3-thumb-imageoptim)[ Fund](https://buymeacoff.ee/bnomei)[ Fund](https://paypal.me/bnomei)[ RSS](/packages/bnomei-kirby3-thumb-imageoptim/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (5)Versions (33)Used By (0)

> The used php lib will most likely not recieve an update for php 8 so I decieded to drop support for this plugin.

Kirby 3 Thumb Imageoptim
========================

[](#kirby-3-thumb-imageoptim)

[![Release](https://camo.githubusercontent.com/01fc5cbf0e03e94e913639c2058196259bc0785ba665ff0b2dd1d23288f1b05c/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f762f626e6f6d65692f6b69726279332d7468756d622d696d6167656f7074696d3f636f6c6f723d616538316666)](https://camo.githubusercontent.com/01fc5cbf0e03e94e913639c2058196259bc0785ba665ff0b2dd1d23288f1b05c/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f762f626e6f6d65692f6b69726279332d7468756d622d696d6167656f7074696d3f636f6c6f723d616538316666)[![Downloads](https://camo.githubusercontent.com/c524aeb78175418cc1ba0164acc9513dee28b7e01fdfda94023b7fb13599a8ae/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f64742f626e6f6d65692f6b69726279332d7468756d622d696d6167656f7074696d3f636f6c6f723d323732383232)](https://camo.githubusercontent.com/c524aeb78175418cc1ba0164acc9513dee28b7e01fdfda94023b7fb13599a8ae/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f64742f626e6f6d65692f6b69726279332d7468756d622d696d6167656f7074696d3f636f6c6f723d323732383232)[![Build Status](https://camo.githubusercontent.com/37968189f7d0c47a5f735c616890ed610ad416cb5dd7729e16045ec90be47c68/68747470733a2f2f666c61742e62616467656e2e6e65742f7472617669732f626e6f6d65692f6b69726279332d7468756d622d696d6167656f7074696d)](https://travis-ci.com/bnomei/kirby3-thumb-imageoptim)[![Coverage Status](https://camo.githubusercontent.com/d7107c4d02e3602883377d12ed273664af756625778718a81476457046292242/68747470733a2f2f666c61742e62616467656e2e6e65742f636f766572616c6c732f632f6769746875622f626e6f6d65692f6b69726279332d7468756d622d696d6167656f7074696d)](https://coveralls.io/github/bnomei/kirby3-thumb-imageoptim)[![Maintainability](https://camo.githubusercontent.com/927ca7afb2d4b44142650bee3c4600d9bf0be6b1ece02841cbbc4767bfcdea1b/68747470733a2f2f666c61742e62616467656e2e6e65742f636f6465636c696d6174652f6d61696e7461696e6162696c6974792f626e6f6d65692f6b69726279332d7468756d622d696d6167656f7074696d)](https://codeclimate.com/github/bnomei/kirby3-thumb-imageoptim)
[![Twitter](https://camo.githubusercontent.com/b90e4b58a887e8ad09ec267628b75199a48522a9e01e88b129e5d2d730dffe50/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f747769747465722f626e6f6d65693f636f6c6f723d363664396566)](https://twitter.com/bnomei)

Kirby 3 CMS Thumb Component to optimize images using ImageOptim Api.

Commercial Usage
----------------

[](#commercial-usage)

> **Support open source!**
>
> This plugin is free but if you use it in a commercial project please consider to sponsor me or make a donation.
> If my work helped you to make some cash it seems fair to me that I might get a little reward as well, right?
>
> Be kind. Share a little. Thanks.
>
> ‐ Bruno

MONEY[Github sponsor](https://github.com/sponsors/bnomei)[Patreon](https://patreon.com/bnomei)[Buy Me a Coffee](https://buymeacoff.ee/bnomei)[Paypal dontation](https://www.paypal.me/bnomei/15)[Hire me](mailto:b@bnomei.com?subject=Kirby)Installation
------------

[](#installation)

- unzip [master.zip](https://github.com/bnomei/kirby3-thumb-imageoptim/archive/master.zip) as folder `site/plugins/kirby3-thumb-imageoptim` or
- `git submodule add https://github.com/bnomei/kirby3-thumb-imageoptim.git site/plugins/kirby3-thumb-imageoptim` or
- `composer require bnomei/kirby3-thumb-imageoptim`

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

[](#requirements)

- [ImageOptim API key](https://imageoptim.com/api/register) (trial available). This plugin uses v1.3.1.

Setup
-----

[](#setup)

In your `site/config.php` options set the [ImageOptim API key](https://imageoptim.com/api/register).

```
'options' => [
    'bnomei.thumbimageoptim.apikey' => 'YOUR_API_KEY_HERE',
    // ... other options
]
```

> TIP: You can also set a callback if you use the [dotenv Plugin](https://github.com/bnomei/kirby3-dotenv).
> `'bnomei.thumbimageoptim.apikey' => function() { return env('IMAGEOPTIM_APIKEY'); },`

Usage
-----

[](#usage)

Generate thumbs as usual using `resize()` File Method or the `srcset()` function.

```
$img = $page->image('ukulele.jpg');
echo $img->resize(234)->html();
```

If you want your image to be optimized but retain their original size use: `$img->thumbimageoptim()`. You can providing a width or height but its optional.

```
$img = $page->image('ukulele.jpg');
echo $img->thumbimageoptim()->html();
// matches
echo $img->resize($img->width())->html();
```

> TIP: if you use `$img->resize()` without a param you will **not** generate a thumb and it will **not** be optimized.

This plugin will work with the [Srcset Plugin](https://github.com/bnomei/kirby3-srcset/) but be aware that depending on your srcset config a lot of files might be requested to be optimized. The requests are **not** send aync but one after another waiting for the response. The plugin will discard unfinished requests on next retry.

Settings
--------

[](#settings)

bnomei.thumbimageoptim.DefaultDescriptionapikey`callback` or `null`Your imageoptim apikey as string.enabled`true`set to `false` to disable optimization with this pluginforceupload`false`set to `true` when images are not public available (like a website with htpasswd).timelimit`null` or `int`if `int` value is set `set_time_limit` will be called for **each** requestapirequest`array`default `io_quality` and `io_dpr` valuesLocalhost and forceupload
-------------------------

[](#localhost-and-forceupload)

Content is always uploaded on localhost. The `allow_url_fopen` PHP setting must be enabled for the API to do uploading. Check with `ini_get('allow_url_fopen')`. Please be aware of the potential security risks caused by `allow_url_fopen`!

Disclaimer
----------

[](#disclaimer)

This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please [create a new issue](https://github.com/bnomei/kirby3-thumb-imageoptim/issues/new).

License
-------

[](#license)

[MIT](https://opensource.org/licenses/MIT)

It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~41 days

Recently: every ~200 days

Total

29

Last Release

1687d ago

Major Versions

0.6.2 → 1.0.02018-09-07

1.3.3 → 2.0.02019-09-02

PHP version history (2 changes)1.1.5PHP &gt;=7.1.0

2.0.0PHP &gt;=7.2.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3265642?v=4)[Bruno Meilick](/maintainers/bnomei)[@bnomei](https://github.com/bnomei)

---

Top Contributors

[![bnomei](https://avatars.githubusercontent.com/u/3265642?v=4)](https://github.com/bnomei "bnomei (62 commits)")

---

Tags

componentimage-optimizationkirby3kirby3-cmskirby3-pluginresizesrcsetthumbthumbnailthumbnailresizethumbcomponentsrcsetimage-optimizationkirby3kirby3-pluginkirby3-cms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bnomei-kirby3-thumb-imageoptim/health.svg)

```
[![Health](https://phpackages.com/badges/bnomei-kirby3-thumb-imageoptim/health.svg)](https://phpackages.com/packages/bnomei-kirby3-thumb-imageoptim)
```

###  Alternatives

[intervention/image

PHP Image Processing

14.3k194.3M2.2k](/packages/intervention-image)[sybio/image-workshop

Powerful PHP class using GD library to work easily with images including layer notion (like Photoshop or GIMP)

860918.1k11](/packages/sybio-image-workshop)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M102](/packages/intervention-image-laravel)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[james-heinrich/phpthumb

The PHP thumbnail generator

318516.1k6](/packages/james-heinrich-phpthumb)[jbzoo/image

A PHP class that simplifies working with images

171126.9k3](/packages/jbzoo-image)

PHPackages © 2026

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