Skip to content

abdollahpour/micro-image-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Docker Image Size (latest by date) Coverage Status Build Status

micro-image-manager

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).

Example

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.

More documents

About

Distributed, manage and optimise image for your microservices

Resources

Stars

Watchers

Forks

Packages

No packages published