https://github.com/dimitrinicolas/lepto-webp
Lepto plugin for creating webp alternatives
https://github.com/dimitrinicolas/lepto-webp
lepto lepto-plugin webp
Last synced: 8 months ago
JSON representation
Lepto plugin for creating webp alternatives
- Host: GitHub
- URL: https://github.com/dimitrinicolas/lepto-webp
- Owner: dimitrinicolas
- License: mit
- Created: 2018-06-12T15:13:08.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-18T11:33:55.000Z (almost 8 years ago)
- Last Synced: 2025-09-19T23:30:48.781Z (9 months ago)
- Topics: lepto, lepto-plugin, webp
- Language: JavaScript
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lepto-webp
```console
$ npm i -D lepto-webp
```
See [lepto documentation](https://github.com/dimitrinicolas/lepto) for usage.
This plugin has no options, just add it to your plugins list.
Default options:
```js
"use": [
{
"name": "lepto-webp",
"quality": 80,
"alphaQuality": 100,
"lossless": false,
"replaceFile": false
}
]
```
## How to use .webp format
Since `.webp` files are not supported on all browser, you have to give them multiples ressources (like a `.jpg` and a `.webp`).
The simplest solution is to use the `` tag:
```html

```
Browsers that supports webp format will only load the webp file, the others will only load the jpg one.
You can learn even more with the [images.guide](https://images.guide/) by Addy Osmani.
## License
This project is licensed under the [MIT license](LICENSE).