https://github.com/pipe01/go-websizer
https://github.com/pipe01/go-websizer
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pipe01/go-websizer
- Owner: pipe01
- Created: 2021-10-05T18:00:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-07T14:35:18.000Z (over 4 years ago)
- Last Synced: 2026-01-22T09:25:28.867Z (5 months ago)
- Language: Go
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-websizer
Converts an image file into various WebP images to use with [`img srcset`](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images).
## Install
```
$ go get github.com/pipe01/go-websizer
```
## Usage
```
Usage of go-websizer:
-lossless
whether to encode webp in lossless mode
-parallel int
maximum number of images to process in parallel (default 8)
-quality float
quality to use when encoding into webp (default 80)
-quiet
if true, only errors will be printed
-size value
comma-separated list of size-format (default 480-webp,720-webp,1080-webp)
```
### Examples
```
go-websizer image1.jpg image2.jpg
```
```
go-websizer -size 480-webp,720-png image*.jpg
```