'How can I generate image with Nodejs
I've made dynamic image generate service like this https://dummyimage.com/ by PHP. now I'm thinking of make a dynamic image generator with nodejs. but it's not as easy as thought. what kind of module can I use for dynamic image generate?
Solution 1:[1]
you may use this node module for generating random images. https://www.npmjs.com/package/js-image-generator
Solution 2:[2]
Another possibility is to use the pureimage package which is a pure JavaScript implementation of the HTML Canvas 2D API for NodeJS. It has no native dependencies.
Solution 3:[3]
I created a thing that generates images from a "function app". Hosting this on Azure costs me only "pennies per month".
You can copy my code and repurpose it. (also function apps support using javascript, which would work similarly)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | itsrajon |
Solution 2 | Marcus |
Solution 3 | djangofan |