https://github.com/axtgr/magick-loader
A webpack loader for processing images with GraphicsMagick
https://github.com/axtgr/magick-loader
Last synced: about 1 month ago
JSON representation
A webpack loader for processing images with GraphicsMagick
- Host: GitHub
- URL: https://github.com/axtgr/magick-loader
- Owner: axtgr
- Created: 2015-11-25T23:00:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-25T23:03:20.000Z (over 10 years ago)
- Last Synced: 2025-10-17T17:16:41.233Z (8 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# magick-loader
A [webpack](http://webpack.github.io/) loader for processing images with GraphicsMagick.
## Installation
1. Install [GraphicsMagick](http://www.graphicsmagick.org/)
2. `npm install --save-dev magick-loader`
3. If the loader doesn't work, try installing [ImageMagick](http://www.imagemagick.org/)
## Usage
```javascript
require('file!img!magick?-resize 1920x1080!./image.jpg');
```
The query string (`-resize 1920x1080` in the example) will be passed to GraphicsMagick as command line parameters ([gm](https://github.com/aheckmann/gm)'s `.out()` method is used for this).