-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Combine WebP and AVIF ```php <?php $thumb = $juImg->render('images/sampledata/fruitshop/apple.jpg', [ 'w' => '300', 'h' => '100', 'q' => '95', 'avif' => true, 'webp' => true ]); ?> <picture> <source srcset="<?php echo $thumb->avif; ?>" type="image/avif"> <source srcset="<?php echo $thumb->webp; ?>" type="image/webp"> <img src="<?php echo $thumb->img; ?>" alt="Apple" width="300" height="100"> </picture> ``` Display as: ```html <picture> <source srcset="img/apple.avif" type="image/avif"> <source srcset="img/apple.webp" type="image/webp"> <img src="img/apple.jpg" alt="Apple" width="300" height="100"> </picture> ```
- Loading branch information
1 parent
5306d82
commit 1fc6268
Showing
3 changed files
with
93 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters