PHPackages                             brocode/module-image-optimizer-avif - 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. brocode/module-image-optimizer-avif

ActiveMagento2-module[Image &amp; Media](/categories/media)

brocode/module-image-optimizer-avif
===================================

1.0.2(1mo ago)0163MITPHPPHP &gt;=8.1

Since Jun 29Pushed 2w ago1 watchersCompare

[ Source](https://github.com/brosenberger/module-image-optimizer-avif)[ Packagist](https://packagist.org/packages/brocode/module-image-optimizer-avif)[ Fund](https://www.buymeacoffee.com/brosenberger)[ RSS](/packages/brocode-module-image-optimizer-avif/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (4)Used By (0)

Image Optimizer AVIF Converter - a Magento 2 converter module for AVIF images
=============================================================================

[](#image-optimizer-avif-converter---a-magento-2-converter-module-for-avif-images)

> 📖 **Full docs, design notes &amp; production guidance:**[brocode.at/modules/module-image-optimizer](https://brocode.at/modules/module-image-optimizer/)Part of the BroCode Image Optimizer family for Magento 2.

This module provides an AVIF image converter for Magento 2. It is based on the [brocode/module-image-optimizer](https://github.com/brosenberger/module-image-optimizer)

[!["Buy Me A Coffee"](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/brosenberger)

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

[](#requirements)

- Magento 2.4.x
- Web server: **nginx** (the only server Adobe supports from 2.4.9; nginx 1.30). Apache config is included for older installs, but Apache was dropped from Magento's tested requirements at 2.4.8-p3 / 2.4.7-p7.
- PHP 8.3 / 8.4 (8.5 on 2.4.9)

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

[](#installation)

```
composer require brocode/module-image-optimizer-avif
bin/magento module:enable BroCode_ImageAvifOptimizer
bin/magento setup:upgrade

```

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

[](#configuration)

The configuration can be found under `Stores -> Configuration -> Services -> BroCode ImageOptimizer -> Image Avif`. Currently the image quality can be set (value between 0 and 100) and the converter can be disabled.

### Apache Configuration

[](#apache-configuration)

Add following snippet to the .htaccess file, which serves public images that are converted:

```
 ############################################
 ## if client accepts avif, rewrite image urls to use avif version
AddType image/avif .avif
RewriteCond %{HTTP_ACCEPT} image/avif
RewriteCond %{REQUEST_FILENAME} (.*)\.(png|gif|jpe?g)$
RewriteCond %{REQUEST_FILENAME}\.avif -f
RewriteRule ^ %{REQUEST_FILENAME}\.avif [L,T=image/avif]

```

### Nginx Configuration

[](#nginx-configuration)

Merge into the project nginx vhost (`nginx.conf.sample`). Place the `map` in `http {}`; add the `location` before Magento's generic static `location` under `/media/`.

```
# In http { } (once per nginx instance or included vhost file)
map $http_accept $avif_suffix {
    default "";
    "~*avif" ".avif";
}

# In server { }
location ~* ^/media/.+\.(png|gif|jpe?g)$ {
    add_header Vary Accept;
    try_files $uri$avif_suffix $uri $uri/ /get.php$is_args$args;
}

```

Further Information
-------------------

[](#further-information)

See base module for more informations on how to setup the image optimizer: [brocode/module-image-optimizer](https://github.com/brosenberger/module-image-optimizer)

Module family
-------------

[](#module-family)

ModulePurpose[module-image-optimizer](https://github.com/brosenberger/module-image-optimizer)Base: scan `pub/media`, write modern-format sidecars[module-image-optimizer-webp](https://github.com/brosenberger/module-image-optimizer-webp)WebP converter[module-image-optimizer-avif](https://github.com/brosenberger/module-image-optimizer-avif)AVIF converter[module-image-optimizer-queue](https://github.com/brosenberger/module-image-optimizer-queue)Async conversion via the Magento queue[module-image-optimizer-amqp](https://github.com/brosenberger/module-image-optimizer-amqp)Async conversion over RabbitMQ/AMQPDocs &amp; guides: **[brocode.at](https://brocode.at/modules/module-image-optimizer/)**

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance95

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~348 days

Total

3

Last Release

38d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9453d161c28a18e817351e00d7ebe81ada31842a249ffb3389830b3483584e60?d=identicon)[brosenberger](/maintainers/brosenberger)

---

Top Contributors

[![rosenberger-e-conomix](https://avatars.githubusercontent.com/u/47806105?v=4)](https://github.com/rosenberger-e-conomix "rosenberger-e-conomix (8 commits)")[![brosenberger](https://avatars.githubusercontent.com/u/2969243?v=4)](https://github.com/brosenberger "brosenberger (1 commits)")

### Embed Badge

![Health badge](/badges/brocode-module-image-optimizer-avif/health.svg)

```
[![Health](https://phpackages.com/badges/brocode-module-image-optimizer-avif/health.svg)](https://phpackages.com/packages/brocode-module-image-optimizer-avif)
```

###  Alternatives

[fastly/magento2

Fastly CDN Module for Magento 2.4.x

1564.4M1](/packages/fastly-magento2)[yireo/magento2-next-gen-images

Magento 2 module to add NextGen images support to the Magento frontend

471.2M2](/packages/yireo-magento2-next-gen-images)[checkoutcom/magento2

Checkout.com Payment Gateway for Magento 2

34276.3k1](/packages/checkoutcom-magento2)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1860.2k](/packages/myparcelnl-magento)[elgentos/magento2-imgix

Imgix extension for Magento 2 to process images

1670.0k](/packages/elgentos-magento2-imgix)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

3017.9k](/packages/mage-os-module-automatic-translation)

PHPackages © 2026

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