Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/drklrd/remage

Get Image with resizing options.
https://github.com/drklrd/remage

Last synced: 10 days ago
JSON representation

Get Image with resizing options.

Awesome Lists containing this project

README

        

# Remage
Node middleware to get image with resizing options.

# Installation
npm install remage

# Usage

In node controller , add a route using this middleware
app.use('/testimage',require('remage').process);

In your view , attribute the src as
img(src="/testimage?width=200&height=100&url=https://nodejs.org/static/images/logos/nodejs-new-pantone-black.png")

If you dont pass in the width and height options, the deafult image size will be fetched.

#Dependencies
sharp
request
image-size