Jump to content

Extension:AVIF

From mediawiki.org
MediaWiki extensions manual
AVIF
Release status: beta
Implementation Media
Description Automatic generation of AVIF versions of images and thumbnails
Author(s) tesinormed (SomeContributorOnEarthtalk)
Latest version 0.4.0 (2024-11-29)
Compatibility policy Snapshots releases along with MediaWiki. Master is not backward compatible.
MediaWiki >= 1.42
PHP >= 8.1
Database changes No
$wgAVIFExecutablePath
Licence GNU General Public License 2.0 or later
Download
Example Amaranth Legacy

The AVIF extension automatically generates AVIF versions of images. It does not generate AVIF thumbnails.

Currently, only image/png and image/jpeg are supported for transformation.

Installation

[edit]
  • Install the imagick PHP extension.
  • Install libavif.
  • Set up the job queue.
  • Install the PictureHtmlSupport extension.
  • Download, extract and place the file(s) in a directory called AVIF in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'AVIF' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters

[edit]
Variable Description Default value
$wgAVIFExecutablePath Path to the avifenc executable /usr/bin/avifenc

Maintenance scripts

[edit]

GenerateAvifFromFiles.php

[edit]
Option Description
file The file to generate an AVIF version from (can be specified multiple times)

If the file option is not set, the maintenance script will queue transformation jobs for every image/png and image/jpeg file.

See also

[edit]