PHPackages                             codebuds/webp-conversion-bundle - 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. codebuds/webp-conversion-bundle

ActiveSymfony-bundle[Image &amp; Media](/categories/media)

codebuds/webp-conversion-bundle
===============================

A Symfony bundle to generate WebPImages

0.4.0(2y ago)124.1k↓47.8%2MITPHPPHP ^8.3

Since May 10Pushed 2y ago4 watchersCompare

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

READMEChangelog (7)Dependencies (16)Versions (23)Used By (0)

[![Code Coverage Badge](./plugin/.coverage/badge.svg)](./plugin/.coverage/badge.svg)

WebP Conversion Bundle
======================

[](#webp-conversion-bundle)

The WebP Conversion Bundle is a Symfony bundle designed to facilitate the automatic conversion of JPEG, BMP, PNG, and GIF images to WebP format. By converting images to WebP, you can significantly reduce file sizes and improve website rendering speed. This bundle is compatible with PHP 8.1 and 8.2, as well as Symfony 6.1, 6.2, and 6.3

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

[](#configuration)

The WebPConversionBundle allows you to configure various settings to customize the behavior of the image conversion process. To do this, follow these steps:

1. **Install the bundle**: If you haven't already installed the **WebPConversionBundle**, add it to your Symfony project by running the following command:

    ```
    composer require codebuds/webp-conversion-bundle
    ```
2. **Override default configuration**: To customize the bundle's configuration, create a new file named **webp\_conversion.yaml** inside the **config/packages** directory of your Symfony project (if it doesn't exist, create it).
3. **Configure the parameters**: In the **webp\_conversion.yaml** file, you can set the desired configuration options. For example, to change the default quality and upload path, use the following syntax:

    ```
    # config/packages/webp_conversion.yaml
    web_p_conversion:
    quality: 90
    upload_path: '/custom/upload/directory'
    ```

    - **quality**: The quality parameter sets the quality for the generated WebP images. By default, it is set to 80. You can adjust it to a higher or lower value as per your requirements.
    - **upload\_path**: The upload\_path parameter defines the directory where the WebP images will be created. By default, it is set to **/public/images**. You can change it to any other directory that suits your project structure.

Command
-------

[](#command)

This bundle provides a command, **codebuds:webp:convert**, that simplifies the process of converting images to WebP format. The command accepts a directory as an argument, and all images (JPEG, PNG, GIF, and BMP) within that directory will be converted to WebP. The command offers several optional parameters to customize the conversion:

- **--create**: Use this flag to generate the WebP images. If not provided, the directories will be checked, but the final images will not be created.
- **--quality**: Set the quality level for the WebP images (80 by default).
- **--force**: Use this flag to recreate existing WebP images. By default, existing WebP images will not be overwritten.
- **--suffix**: Add a suffix to the names of the created WebP images.

### Example:

[](#example)

```
php bin/console codebuds:webp:convert --create --quality=90 --suffix=_q90 public/images
```

If the *public/images* directory contains an image named *test.jpg*, after executing the command, it will also contain *test\_q90.webp*.

Twig extension
--------------

[](#twig-extension)

The bundle includes a Twig extension that generates WebP images and returns the path to them. This makes it easy to create  elements to optimize website rendering speed.

### Example

[](#example-1)

```

```

The Twig extension also supports VichUploaderBundle assets and LiipImagineBundle filters:

```

```

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 98.6% 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 ~69 days

Recently: every ~187 days

Total

21

Last Release

803d ago

PHP version history (5 changes)0.0.1PHP ^7.4

0.1.0PHP ^7.4 || ^8.0

0.2.0PHP ^8.0

0.3.0PHP ^8.1

0.4.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/0480f4640e4b77d81842082e7b73e903428b52b68f58e244cdc0108a72939004?d=identicon)[DennisdeBest](/maintainers/DennisdeBest)

![](https://www.gravatar.com/avatar/10d081369f263e74ed4a415f05d3304640e8c777e211f2776340ff0a879f733c?d=identicon)[CodeBuds](/maintainers/CodeBuds)

---

Top Contributors

[![DennisdeBest](https://avatars.githubusercontent.com/u/15683927?v=4)](https://github.com/DennisdeBest "DennisdeBest (72 commits)")[![DennisCodeBuds](https://avatars.githubusercontent.com/u/78538176?v=4)](https://github.com/DennisCodeBuds "DennisCodeBuds (1 commits)")

###  Code Quality

Static AnalysisRector

### Embed Badge

![Health badge](/badges/codebuds-webp-conversion-bundle/health.svg)

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M646](/packages/sylius-sylius)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M385](/packages/shopware-core)

PHPackages © 2026

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