PHPackages                             sourcebroker/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sourcebroker/webp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sourcebroker/webp
=================

Webp converter scenarios

0.10.0(5y ago)315.8k↓27.3%MITPHPPHP &gt;=7.0

Since Feb 20Pushed 5y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (11)Used By (0)

webp
====

[](#webp)

- [What does it do?](#what-does-it-do)
- [Webp images generated after redirect to original source](#webp-images-generated-after-redirect-to-original-source)
    - [How to install ?](#how-to-install)
    - [How to test?](#how-to-test)

[What does it do?](#id1)
------------------------

[](#what-does-it-do)

This library is short scenarios of working examples for webp on demand which use rosell-dk/webp-convert in background. There will be two scenarios:

1. call to image which has no webp version yet will redirect to original source and run webp image converter in background
2. call to image which has no webp version yet will stream original source and run webp image converter in background

Next calls to jpg/png will return webp on apache rewrite level.

For now only first scenario is implemented.

[Webp images generated after redirect to original source](#id2)
---------------------------------------------------------------

[](#webp-images-generated-after-redirect-to-original-source)

### [How to install ?](#id3)

[](#how-to-install-)

1. `composer req sourcebroker/webp`
2. Go to folder `vendor/sourcebroker/webp/Resources/WebpRedirectToOriginalAndConvertInBackground`
3. Copy part of htaccess from there to your htaccess or vhost configuration.
4. Copy the example `webp.php` to your DocumentRoot folder. Change the path to vendor folder to your needs.
5. Your webp files will be stored in separate folder in your DocumentRoot folder. By default its `_processed_/webp-images`. You can change this folder by replacing `_processed_/webp-images` in `.htaccess` file and in `webp.php` file.
6. If you open folder `vendor/sourcebroker/webp/Resources/WebpRedirectToOriginalAndConvertInBackground/cms-specific` you will find there `htaccess` and `webp.php` for specific CMSes like for example TYPO3. The path to store files is there selected to best fit the CMS.

### [How to test?](#id4)

[](#how-to-test)

1. Go into Network tab in Chrome DevTools. When you refresh website you should see jpg/png files being redirected to the same url but with `?processing` parameter.
2. When you refresh the page second time some jpg/png should be already converted. Those will have `webp` in column `Type`
3. Check you DocumentRoot folder there should be `_processed_/webp-images` folder created with webp files.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 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 ~2 days

Total

10

Last Release

1894d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6066d053dfdc12f5a676444f6a40b5b7d0b5a112e0ab746c8b04f4a7201b0624?d=identicon)[sourcebroker](/maintainers/sourcebroker)

---

Top Contributors

[![kszymukowicz](https://avatars.githubusercontent.com/u/1453553?v=4)](https://github.com/kszymukowicz "kszymukowicz (26 commits)")

---

Tags

webpWebp

### Embed Badge

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

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

###  Alternatives

[yireo/magento2-webp2

Magento 2 module to add WebP support to the Magento frontend

2091.2M7](/packages/yireo-magento2-webp2)[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)
