Image upload microservice

Image upload microservice

An image is worth a thousand words and probably even more if comparing their size in bytes. When designing my CMS, I originally intended to store images directly in the article, encoded in Base64. However, this would considerably increase the size of each article, making the whole CMS slow.

Ideally images would be loaded independently from articles, which requires them to be served separately. Consequently, I created a simple image management microservice that allows to upload images through a web interface and serves them wherever required.

As an added feature, I used Chokidar to whatch the directory in which uploads are stored so as to allow users to also upload images via file browser.

The source code is available on GitHub: