https://github.com/opentable/image-optimizer
Smart image optimization
https://github.com/opentable/image-optimizer
build-tool compression image nodejs optimization
Last synced: 26 days ago
JSON representation
Smart image optimization
- Host: GitHub
- URL: https://github.com/opentable/image-optimizer
- Owner: opentable
- License: mit
- Created: 2017-02-10T16:16:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-06T21:47:53.000Z (about 8 years ago)
- Last Synced: 2025-04-01T02:49:42.844Z (2 months ago)
- Topics: build-tool, compression, image, nodejs, optimization
- Language: JavaScript
- Size: 10.7 KB
- Stars: 15
- Watchers: 20
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image-Optimizer
In today's media rich world websites tend to have a great deal of imagery. But it's easy to forgot about the user with slow internet connections that have to download these images!
Image-Optimizer aims to solve this problem by:
- Optimise images for web usage 🗜️
- Easily integrating into your projects build pipeline ⚙️
- Keeping track of what is optimised and what isn't 📖## Usage
### Install
```sh
yarn add image-optimizer
```### Integrate
```javascript
const imageOptimizer = require('image-optimizer');imageOptimizer({
root: 'src/style/img', // The root directory for your images.
blacklist: [] // The list of directories/files not to optimize.
}, (err, result) => {...});
```Once the optmization has taken place a ```__image-digest.json``` will be placed in the ```root``` directory.
## Supported Formats
At the moment the following image formats are supported:
- JPEG
- PNG## Roadmap
- Support custom config for different quality settings file & param based.
- Support different compression algorithms ?
- Provide a report of bytes saved...