adt / nette-macro-webp
Installs: 2 418
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 0
Open Issues: 0
Requires
- latte/latte: ^2.3
- nette/http: ^2.0 || ^3.0
- nette/utils: ^2.0 || ^3.0
This package is auto-updated.
Last update: 2022-05-09 15:29:56 UTC
README
Installation
$ composer require adt/nette-macro-webp:@dev
To your config.neon
add:
extensions: webpSrcMacroExtension: ADT\WebpSrcMacroExtension
Usage
Latte
<img n:webpSrc="myImage.jpg">
Output
If browser send header Accept: image/webp
:
<img src="myImage.webp">
If do not:
<img src="myImage.jpg">