micro-image-manager is a super-fast microservice written in Go for optimizing, managing, and hosting images in your distributed applications. You can process and host images in different formats (jpeg, gif, png & webp) and sizes. There's no need for any configuration and setting. The setup procedure could be as easy as running a single command (using Helm).
Use management endpoint to upload/add a new image. Ex:
curl -F profile_small=400x300 -F profile_large=800x600 -F image=@my_image.jpg https://micro-image-manager.abdollahpour.com/api/v1/images
This will return something like (different ID):
{
"id": "5f4a459d28317a9f153c211d",
"profiles": [
{
"name": "small",
"width": 400,
"height": 300
},
{
"name": "large",
"width": 800,
"height": 600
}
],
"formats": ["jpeg", "webp"]
}You can use HTML5 to host your images, fast and efficiently:
<picture>
<source type="image/webp"
srcset="//micro-image-manager.abdollahpour.com/image/5f4a459d28317a9f153c211d.webp?profile=large 800w
//micro-image-manager.abdollahpour.com/image/5f4a459d28317a9f153c211d.webp?profile=small 400w"/>
<source type="image/jpeg"
srcset="//micro-image-manager.abdollahpour.com/image/5f4a459d28317a9f153c211d.jpeg?profile=large 800w
//micro-image-manager.abdollahpour.com/image/5f4a459d28317a9f153c211d.jpeg?profile=small 400w"/>
<img src="//micro-image-manager.abdollahpour.com/image/5f4a459d28317a9f153c211d.jpeg"/>
</picture>This help browser choose right format and size based on device. It can significantly increase performance of your website. For more information please check html file picture tag.