1.0.6 • Published 6 years ago

bz-image v1.0.6

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

bz-image

Install

npm install bz-image -S

Usage Example

Register Route

const bzImage = require('bz-image');
var imageDirectory = path.join(__dirname,'_uploads')
app.use('/images', bzImage(imageDirectory));

Routes

/images/width.height.fitStrategy/filename

width ( optional )
target image width

height ( optional )
target image height

fitStrategy ( optional )
if width and height specified, fitStrategy can be used with values:

  • contain
  • cover
  • inside
  • outside
  • fill

Examples

Fit Width
/images/200/image1.jpg

Fit Height
/images/0.200/image1.jpg

Fit Both with Fith Strategy = Contain
/images/200.200.contain/image1.jpg

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago