Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Implement ImageMagick or similar on server to create image thumbnails #24

Open
wbprice opened this issue Dec 11, 2014 · 2 comments
Open

Comments

@wbprice
Copy link
Member

wbprice commented Dec 11, 2014

https://www.npmjs.com/package/gm looks fairly mature. Provides a node interface to ImageMagick running on the server.

@qwo
Copy link
Member

qwo commented Dec 11, 2014

its a pretty standard lib to handle this. I wrote and tested some Code to upload to s3 but its also highlights compressing the images. it also shows how to upload locally to a directory.

if you add GM in there and preprocess before uploading or uploading a image_001.jpg and image_001_thumbnail.jpg that could work.

its written in an express route project but you can copy paste the logic into a happy route with no difference besides changes in the res/req object syntax.
https://github.com/stanzheng/service-testing-ground/blob/master/app/routes/uploads.js

@ghost
Copy link

ghost commented Dec 17, 2014

If we go about it this way, we could actually remove the imageurl part of the model, since that refers to an existing thumbnail and just use the fullimage as either an image element or something of that nature which points to the image host we have.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants