问题
I'm developing a web project using Node.js where users can set their profile image by uploading it to the server.
I need to perform basic manipulation on those images (resize and crop), and then store them into a blob.
I usually use GraphicsMagic or ImageMagick to achieve this kind of tasks, but I want to publish this project on Microsoft Azure website.
Is there a known and safe way to manipulate images serverside into an Azure website using Node.js?
回答1:
You can use node modules with Azure Websites. However you cannot install any third party apps on the Web Sites (thus no ImageMagick or Graphics Magic).
Looking out in the wild, you may find some native node modules that does not require external components to manipulate images like the lwip and probably some more. Just find your module that is not dependent on external third party libraries and is fully self contained.
回答2:
I made imagemagick work on azure websites by using site extension.
You can check the repository for more info:
https://github.com/fatihturgut/azure-imagemagick-nodejs
来源:https://stackoverflow.com/questions/26150375/image-manipulation-using-node-js-on-azure-website