@ngochipx/responsive-image
v1.0.4
Published
Tool resize images based on express and imageMagick.
Downloads
4
Readme
Welcome to @ngochipx/responsive-image!
Tool resize images based on express and imageMagick.
Install
yarn add @ngochipx/responsive-image
Using
init:
const ResponsiveImage = require('@ngochipx/responsive-image')
...
Route.get("/thumb", async ({ request, response }) => {
if (request.query.src) {
let src = request.query.src.replace("http://localhost:3000", __ROOTDIR__ +'/public')
console.log(src)
let image = new ResponsiveImage(src);
image.thumb(request, response);
return false;
} else {
response.sendStatus(403);
}
})
NgocHip