Image Hosting Solutions

Image Hosting Solutions
eugewxBackground
For my personal blog, I initially used Cloudflare R2’s free tier for image hosting. However, concerns over storage limits and unexpected charges led me to self-host MinIO, a lightweight, S3-compatible object storage solution that provides full control over my data.
Introduction to MinIO as an Image Hosting Solutions
MinIO allows easy file uploads and URL-based access, making it ideal for hosting images, videos, and other files. By running MinIO in a Docker container, I can efficiently manage storage while avoiding third-party service restrictions.
- Upload images to MinIO and construct the correct URL to display them on a webpage.
- Store videos and play them directly in supported browsers.
- Host audio files or use MinIO as a personal file-sharing system.
Files are accessible via the following format:
1 | https://example.com/bucket_name/file.name |
Image Hosting Solutions for Blogging
As blogging on Hexo are using markdown format here is my workflows.
✨ Prerequisite
MinIOserving as the image storagePicGoserving as image upload toolsVSCodeserving as markdown editorvs-piclistautomate image upload from markdown
⚒️ Workflows
While drafting writing blog in VSCode, all image will be stored locally first. Once the blog page was finalized, I will upload all images in blog page to MinIO through PicGO localhost upload server automated by vs-piclist
Deploy MinIO in a Docker Container
MinIO Container Docker Compose Structure
1 | |__ .env |
.env
1 | # DOCKER PATH |
minio.conf
1 | # MINIO_ROOT_USER and MINIO_ROOT_PASSWORD sets the root account for the MinIO server. |
minio.yml
1 | services: |
docker-compose.yml
1 | networks: |
Start the service.
1 | sudo docker compose -f <docker-compose-xxx>.yml up -d |
Create Bucket
Access to
minio-console.example.comwith the credentials being defined inminio.confAccess to the
Bucketsmodule andCreate Bucketswith any nameAfter created bucket, content of the bucket should be unable to read, therefore now we should configure correct permission by go to Anonymous > Add Access Rule
As this image bucket is to serve publicly, we can set the access permission to
public-readonlyGo back to the bucket summary, now the Access Policy will shows as custom which means we had configured correctly.
Configure access-token
Access to the
Access Keysmodule andCreate access keyBefore proceed to Create, save the Access Key and Secret Key to secret place, we will use it when setting up PicGo
PicGo
https://github.com/Molunerfinn/PicGo
Download and install on the workstation.
Go to plugins and download below list
s3- Core component to allow PicGo setup connection to MinIOwebp- Uploaded image convert to webp format for better sizingcompression- Lossless compress uploaded imageremove-exif- Remove metadata of the imagerename-file- Rename the image filename for better recognition.
Go to PicBed settings > Amazon S3 > Add
Custom endpoint should be
MinIO APIinstead ofMinIO Console(Optional) Enable PicGo-Server localhost to host the automate image upload from
vs-piclist





















