PHPackages                             felixhaeberle/kirby3-webp - 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. felixhaeberle/kirby3-webp

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

felixhaeberle/kirby3-webp
=========================

Kirby 3 CMS plugin for converting JPG, JPEG and PNG into much smaller WEBP – speed up your website!

v2.0.0(2y ago)397.5k↓22.2%7[2 issues](https://github.com/felixhaeberle/kirby3-webp/issues)MITPHP

Since Jun 22Pushed 2y ago7 watchersCompare

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

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

kirby3-webp
===========

[](#kirby3-webp)

[![license](https://camo.githubusercontent.com/08f1327ba45a43077d8c9aa7fa506e8e2424e17570d978310e718b292a489591/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f66656c69786861656265726c652f6b69726279332d77656270)](https://camo.githubusercontent.com/08f1327ba45a43077d8c9aa7fa506e8e2424e17570d978310e718b292a489591/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f66656c69786861656265726c652f6b69726279332d77656270)[![issues-open](https://camo.githubusercontent.com/e23152b455e0030e8c83ed6dfc0f0000e0e0eb40faaa55c7b15c530ff913ce58/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f66656c69786861656265726c652f6b69726279332d77656270)](https://camo.githubusercontent.com/e23152b455e0030e8c83ed6dfc0f0000e0e0eb40faaa55c7b15c530ff913ce58/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f66656c69786861656265726c652f6b69726279332d77656270)[![tweet](https://camo.githubusercontent.com/8e2ce27cb6e4796f2799035190b6486045dd1d64d8606446538e70819653d576/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c3f75726c3d68747470732533412532462532466769746875622e636f6d25324666656c69786861656265726c652532466b69726279332d77656270)](https://camo.githubusercontent.com/8e2ce27cb6e4796f2799035190b6486045dd1d64d8606446538e70819653d576/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c3f75726c3d68747470732533412532462532466769746875622e636f6d25324666656c69786861656265726c652532466b69726279332d77656270)

Kirby 3 CMS plugin for converting **JPG**, **JPEG** and **PNG** into much smaller **WEBP** – speed up your website! 🚀🔥

[![](https://user-images.githubusercontent.com/34959078/82842741-f6450900-9eda-11ea-8f63-1cc3fe1eb5f0.png)](https://user-images.githubusercontent.com/34959078/82842741-f6450900-9eda-11ea-8f63-1cc3fe1eb5f0.png)

[![](https://user-images.githubusercontent.com/34959078/83130175-332d1d80-a0de-11ea-850f-1fe8abc36e83.gif)](https://user-images.githubusercontent.com/34959078/83130175-332d1d80-a0de-11ea-850f-1fe8abc36e83.gif)

... and get the Lighthouse statistic you are dreaming of! 😍 🥁 Installation
--------------

[](#-installation)

### Composer

[](#composer)

```
composer require felixhaeberle/kirby3-webp

```

### Git Submodule

[](#git-submodule)

```
git submodule add https://github.com/felixhaeberle/kirby3-webp.git site/plugins/kirby3-webp

```

### Clone or download

[](#clone-or-download)

1. [Clone](https://github.com/felixhaeberle/kirby3-webp.git) or [download](https://github.com/felixhaeberle/kirby3-webp/archive/master.zip) this repository.
2. Unzip / Move the folder to `site/plugins`.

1️⃣ Activate the plugin
-----------------------

[](#1️⃣--activate-the-plugin)

Activate the plugin in the `site/config/config.php` file with `kirby3-webp => true`.

```
return [
  'kirby3-webp' => true
]

```

2️⃣ Getting started
-------------------

[](#2️⃣--getting-started)

After installing and activating the plugin, you need to **serve webp files to the frontend** with your server configuration.

### Apache

[](#apache)

Add the following to your `.htaccess`:

```

  RewriteEngine On

  # Checking for WebP browser support ..
  RewriteCond %{HTTP_ACCEPT} image/webp

  # .. and if there's a WebP version for the requested image
  RewriteCond %{DOCUMENT_ROOT}/$1.webp -f

  # Well, then go for it & serve WebP instead
  RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1]

  Header append Vary Accept env=REDIRECT_accept

  AddType image/webp .webp

```

### NGINX

[](#nginx)

For NGINX, use the following virtual host configuration:

```
// First, make sure that NGINX' `mime.types` file includes 'image/webp webp'
include /etc/nginx/mime.types;

// Checking if HTTP's `ACCEPT` header contains 'webp'
map $http_accept $webp_suffix {
  default "";
  "~*webp" ".webp";
}

server {
  // ...

  // Checking if there's a WebP version for the requested image ..
  location ~* ^.+\.(jpe?g|png)$ {
    add_header Vary Accept;
    // .. and if so, serving it
    try_files $1$webp_ext $uri =404;
  }
}

```

⚙️ Options
----------

[](#️--options)

You have multiple options when using `kirby3-webp` to configure it to your needs:

OptionTypeDefaultDescription`kirby3-webp.quality`Integer`90`See the [Auto quality](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#auto-quality) section.`kirby3-webp.maxQuality`Integer`85`Only relevant for jpegs and when quality is set to "auto".`kirby3-webp.defaultQuality`Integer`85``kirby3-webp.metadata`Array`"none"`Valid values: "all", "none", "exif", "icc", "xmp". Note: Currently only cwebp supports all values.

 gd will always remove all metadata. ewww, imagick and gmagick can either strip all, or keep all (they will keep all, unless metadata is set to none)`kirby3-webp.encoding`Array`"auto"`See the [Auto selecting between lossless/lossy encoding](https://github.com/rosell-dk/webp-convert/blob/master/docs/v2.0/converting/introduction-for-converting.md#auto-selecting-between-losslesslossy-encoding) section.`kirby3-webp.skip`Boolean`false`If true, conversion will be skipped (ie for skipping png conversion for some converters)👏 Credit
--------

[](#--credit)

- [S1SYPHOS/kirby-webp](https://github.com/S1SYPHOS/kirby-webp)
- [rosell-dk/webp-convert](https://github.com/rosell-dk/webp-convert)
- [getkirby](https://github.com/getkirby)

🤩 How this plugin works
-----------------------

[](#--how-this-plugin-works)

[![kirby3-webp](https://user-images.githubusercontent.com/34959078/82845567-60fb4200-9ee5-11ea-8214-df65ea018f27.gif)](https://user-images.githubusercontent.com/34959078/82845567-60fb4200-9ee5-11ea-8214-df65ea018f27.gif)

🤯 Good to know
--------------

[](#--good-to-know)

Sometimes, if the pictures are really big (multiple MB's) the converting process takes naturally longer, but does complete for sure. The .webp gets generated, but not selected, because if the client can accept .webp, the .webp is sent to the client instead of the .png, .jpeg or .jpg. Therefore, you are in need of the Apache/nginx configuration.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.3% 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 ~556 days

Total

3

Last Release

1038d ago

Major Versions

v1.0.1 → v2.0.02023-07-10

### Community

Maintainers

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

---

Top Contributors

[![felixhaeberle](https://avatars.githubusercontent.com/u/34959078?v=4)](https://github.com/felixhaeberle "felixhaeberle (29 commits)")[![MichaelvanLaar](https://avatars.githubusercontent.com/u/311043?v=4)](https://github.com/MichaelvanLaar "MichaelvanLaar (4 commits)")[![casderooij](https://avatars.githubusercontent.com/u/13818515?v=4)](https://github.com/casderooij "casderooij (1 commits)")

---

Tags

kirby-cmskirby-pluginkirby3

### Embed Badge

![Health badge](/badges/felixhaeberle-kirby3-webp/health.svg)

```
[![Health](https://phpackages.com/badges/felixhaeberle-kirby3-webp/health.svg)](https://phpackages.com/packages/felixhaeberle-kirby3-webp)
```

###  Alternatives

[flokosiol/focus

Better image cropping for Kirby CMS

18265.1k](/packages/flokosiol-focus)[sylvainjule/annotator

Place pins / define zones on an image synced with a structure field

10915.2k](/packages/sylvainjule-annotator)[tobimori/kirby-thumbhash

Kirby Image placeholders with the smarter ThumbHash integration

378.1k1](/packages/tobimori-kirby-thumbhash)[sylvainjule/imageradio

Add illustrations to Kirby's radio buttons

5916.8k](/packages/sylvainjule-imageradio)[timnarr/kirby-imagex

Modern images for Kirby CMS – This plugin helps you orchestrate modern, responsive and performant images in Kirby

797.5k1](/packages/timnarr-kirby-imagex)[rosell-dk/webp-convert-cloud-service

Cloud service for converting JPEG &amp; PNG to WebP

545.6k3](/packages/rosell-dk-webp-convert-cloud-service)

PHPackages © 2026

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