Skip to content
Fast streaming image resizer API using libvips
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
public
.buildpacks
README.md
app.js
index.js
package.json
server.js

README.md

vips-resizer

Fast streaming image resizer API using libvips on node

Install

git clone https://github.com/digidem/vips-resizer
cd vips-resizer
npm install

Start

By default this will resize images from any domain. To only allow images from certain domains to be resized, pass a comma-separated list of whitelisted URLs from which to process images. E.g.

WHITELIST="mydomain.com,s3.amazonaws.com/mybucket" npm start

API

GET /[width/][height/][quality/]imageUrl or GET /[width/][height/][quality/]?url=imageUrl

Resize an image to fit within width and height at quality. If height is omitted it is the same as width. If quality is omitted the default is 70. If width, height and quality are omitted they default to MAX_WIDTH which is 4000px by default.

image_url should include the protocol e.g. http://example.com/myimage.jpg

You can’t perform that action at this time.