Xlenco

Xlenco

github
zhihu
email

Summary of Image Hosting Solutions

Preface#

Currently, MarkDown is a lightweight markup language that is essential for programmers. It avoids the tediousness of reformatting rich text editors when changing platforms, allowing us to focus on technical output. However, using Markdown also has its drawbacks, such as the storage of images. Markdown files must use a link when using images. Each platform has its own image storage method, and when the same article is published on different platforms, the images need to be uploaded separately. It is too troublesome to store them all locally.

Currently, the best solution is to use an image hosting service to store images.

Image Hosting ServiceDescription
sm.msRegistration required, overseas server [Free]
meotuRegistration required, domestic server [Free]
z4a Image HostingRegistration required, domestic server [Free]
imgtpNo registration required, domestic server, maximum support 15MB [Free]
imgbedNo registration required, domestic server, maximum support 20MB [Free]
Aggregate Image HostingRegistration required, domestic server [Free]
NiupicNo registration required, Japanese server [Free]
imgbbNo registration required, Asia-Pacific server [Free]
uploadNo registration required, overseas server [Free]
catboxNo registration required, overseas server [Free]
Passing Image HostingRegistration required, overseas server [Free]
TG Image HostingRegistration required, domestic and overseas servers [Free]
PostimagesNo registration required, fast foreign server [Free]
imglocNo registration required, domestic server, maximum support 6MB [Free]
Yinghua Image HostingNo registration required, aggregated CDN image hosting [Free]
Meet Image HostingNo registration required, aggregated CDN image hosting [Free]
Hello Image HostingRegistration required, domestic CDN [Free]
IM.GENo registration required, Hong Kong CDN [Free]
Cloud Image HostingGlobal CDN [Free]

Before uploading images, it is recommended to compress them to reduce space usage and effectively speed up image loading. Here are some good compression tools:

Online Tools:

The difference between the two is that TinyPNG is lossless compression, while Imagestool is lossy compression, but the difference cannot be seen with the naked eye.

Local Tools:

  • Format Factory

Image Hosting Management Tools#

After selecting a good image hosting service, the next step is to upload and use images. At this time, you will face a problem: you have to go to the image hosting service to upload the image, then copy the link, and then go back to the platform where you want to use the image to paste it. It's very troublesome. Therefore, image hosting management tools have emerged to help us quickly upload images and obtain image URL links, saving us the trouble of manual operations.

Here are some excellent image hosting management tools:

PicGo is highly recommended. PicGo supports smms, Upyun, Qiniu Cloud, Alibaba Cloud OSS, Tencent Cloud COS, Weibo, Github, Gitee, Amazon S3, and custom upload interfaces (supports other storage options as well). It can also compress images before uploading, eliminating the need for separate compression tools.

Other Solutions#

Using Major Platforms for Free#

Here, we are referring to using websites such as Jianshu, Cnblogs, Xiaohongshu, Zhihu, and Bilibili to obtain image links. These websites generally have anti-leeching measures, but the speed is fast, especially for domestic nodes.

Direct Usage:#

The "Meet Image Hosting" and "Yinghua Image Hosting" mentioned in the popular free image hosting services section utilize the upload interface of major platforms, allowing direct usage.

  1. Jike Image Hosting (Login required for some interfaces)
  • Introduction: Supports Alibaba/Jingdong/Baidu/Tencent/58 Tongcheng/Meituan and other global CDN accelerations, supports HTTPS!
  • Official Website: https://test2.jiketuchuang.com/
  1. Bilibili Image Hosting

Anti-Leeching Solutions:#

Empty referrer can bypass most anti-leeching measures. Add the following content to the head section:

<meta name="referrer" content="no-referrer">

Or add the no-referrer header to the image:

<img src="example.com" referrerPolicy="no-referrer"/>

However, personally, I think the best option for image hosting is cloud storage or Baidu's "Yike" album (a bit troublesome). Even if major platforms strengthen their anti-leeching measures, you can still download the images to your local device and switch services.

Due to the instability of jsdelivr, using it as an image hosting service is highly discouraged. Moreover, using this method as an image hosting service violates jsdelivr's TOS.

2. Abusing the service and its resources, or using jsDelivr as a general-purpose file or media hosting service. This includes, for example:

- running an image hosting website and using jsDelivr as a storage for all uploaded images,
- hosting videos, file backups, or other files in large quantities.

We recognize that there are legitimate projects that consist of a large number of files, and these are not considered abuse. For example: icons packs, apps, or games with a large number of assets.

NPM + NPM CDN#

{% link npm image hosting usage, https://anzhiy.cn/posts/72ea.html, https://img02.anzhiy.cn/adminuploads/1/2022/09/15/63232b7d91d22.jpg %}

backBlazeb2 + Cloudflare CDN#

References:

IPFS Image Hosting#

InterPlanetary File System (IPFS). IPFS is a distributed web, peer-to-peer hypermedia protocol. It can make our Internet faster, more secure, and more open. The goal of the IPFS protocol is to replace the traditional Internet protocol HTTP.

Self-Deployed Image Hosting Services#

There are many open-source projects on Github in this category, such as:

However, they are not recommended due to high deployment costs. If you have better suggestions or recommended image hosting services, please leave a comment in the comment section below.

Image to Base64 Conversion#

Convert images to text format for storage. They can be displayed in web pages and Typora. Here is a recommended tool:
Image to BASE64 Encoding | CaiNiao Tools

<!--Using Base64 in HTML-->
<img width="40" height="30" src="data:image/jpg;base64,/9j/4QMZRXhpZgAASUkqAAgAAAAL...." />
<!--Using Base64 in MD-->
![](base64)
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.