Connect middleware for image resizing?

43 views
Skip to first unread message

Ingwie Phoenix

unread,
Oct 26, 2014, 4:02:16 PM10/26/14
to nod...@googlegroups.com
Hey everyone.

I am working on a website that will have an image gallery. For bandwith related stuff, I would like to only dispaly a shrinked image and when its clicked, dispaly a full version of it. I was thinking about implementing this myself, but maybe it already exists. So here is what I was thinking about:

- User uploads an image. Let’s assume the filename is abc.jpeg
- Another user opens the galelry and the page for this image. Now I’d like to be able to request a resized version, and cache it. I.e.: …/abc.jpeg?w=1024&h=786
- The image is processed on the serverside, and the resized version is saved. So when its requeted again, its simply re-used. When the original file’s hash changes, the cached version is rebuild.

Does such middleware exist?

Kind regards, Ingwie

Mohammed S Fadin

unread,
Oct 27, 2014, 4:56:02 AM10/27/14
to nod...@googlegroups.com
Isn't this what you are looking for?

https://www.npmjs.org/package/image-shrink

Reply all
Reply to author
Forward
0 new messages