adt/nette-macro-webp

v1.0 2020-01-21 14:54 UTC

This package is auto-updated.

Last update: 2020-09-09 11:49:45 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">