pbausch / imageSize

A quick node.js script that resizes images on-the-fly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

imageSize

A node.js script that resizes images on-the-fly.

Specify a ROOT_DIR environment variable to tell this script where to find the images. Then include a

/[width]x[height]/ 

directory in front of the image path you're requesting. The script uses sharp to resize the image to the specified dimensions and return it. It's especially handy if you use this behind a CDN like CloudFront so you don't have to resize the images with every request.

About

A quick node.js script that resizes images on-the-fly


Languages

Language:JavaScript 100.0%