diff --git a/README.md b/README.md index f982899..728fd26 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,41 @@ $thumb = $juImg->render('images/sampledata/fruitshop/apple.jpg', [ |--------------|---------|---------|----------------------------------------------------------------------------------------| | webp | Boolean | false | If `true` add support WebP image. For this option use tag ``, see in example. | +### AVIF support + +AVIF image format (requires PHP 8.1.0) + +```php +render('images/sampledata/fruitshop/apple.jpg', [ + 'w' => '300', + 'h' => '100', + 'q' => '95', + 'avif' => true +]); +?> + + + + Apple + +``` + +Display as: + +```html + + + + Apple + +``` + +| WebP command | Type | Default | Description | +|--------------|---------|---------|-------------------------------------------------------------------------| +| avif | Boolean | false | If `true` add support WebP image. For this option use tag ``. AVIF image format (requires PHP 8.1.0) | + ### YouTube and Vimeo support Youtube: diff --git a/build.xml b/build.xml index 8cf9754..4eb0c2b 100644 --- a/build.xml +++ b/build.xml @@ -3,7 +3,7 @@ basedir="."> + value="5.5" /> $img, + 'avif' => $this->thumb($url, array_merge($attr, [ 'f' => 'avif' ])) + ]; + } + return $img; }