1.0.6 • Published 7 years ago

bz-image v1.0.6

Weekly downloads
3
License
ISC
Repository
github
Last release
7 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

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago