Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxencerb/img-optimizer-cli
https://github.com/maxencerb/img-optimizer-cli
Last synced: about 7 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/maxencerb/img-optimizer-cli
- Owner: maxencerb
- Created: 2023-09-25T13:50:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-25T14:28:18.000Z (about 1 year ago)
- Last Synced: 2023-09-25T22:06:17.011Z (about 1 year ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Web Image optimizer
The goal here is to create multiple image formats and sizes to optimize web page loading.
The image formats are:
- AVIF
- WEBP
- RawThere are 2 types of sizes:
- `small` for file that are supposed to be displayed in small size (like thumbnails max half of the wiewport)
- `large` for file that are supposed to be displayed in large size (like full screen images)The image sizes are defined according to these 2 types.
A snippet for usage is generated for each image.
The folder structure is as follows:
- `raw_img_src.extension`
- raw_img_src
- avif
- [sizes].avif
- webp
- [sizes].webp
- snippet.html## Usage
### Get help on the package
```bash
npx img-optimizer-cli help
```### Create an image optimization
```bash
npx img-optimizer-cli optimize test.png
```