https://github.com/lassehaslev/imagesizerjs
Adds image size options to filname ( Automaticly ads -{width}x{height}-resize to filename ).
https://github.com/lassehaslev/imagesizerjs
Last synced: about 1 month ago
JSON representation
Adds image size options to filname ( Automaticly ads -{width}x{height}-resize to filename ).
- Host: GitHub
- URL: https://github.com/lassehaslev/imagesizerjs
- Owner: LasseHaslev
- License: mit
- Created: 2016-06-30T15:29:08.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-20T06:10:36.000Z (over 9 years ago)
- Last Synced: 2025-02-23T18:16:59.041Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# @lassehaslev/imagesizerjs
> Automaticly ads ```-{width}x{height}-resize``` to image filename.
## Installation
Run ```npm install @lassehaslev/imagesizerjs --save``` in your project folder
## Usage
#### 1a) Import the script file
``` html
```
#### 1b) Or require as module
``` js
var ImageSize = require( '@lassehaslev/imagesizerjs' );
```
#### 2) Use the class
``` js
var imageSize = new ImageSize( document.querySelector( 'img' ), {
steps: 200, // How many pixels before new image
} );
```
## Development
``` bash
# Clone package
git clone https://github.com/LasseHaslev/imagesizerjs
# install dependencies
npm install
# serve with hot reload at http://localhost:3000/
gulp watch
# build for production with minification
gulp --production
```
## License
MIT, dawg