Hi, I’m Fishskin, and there’s been another unexpected thing these days: Gitee’s drawing bed is broken!

Chart bed: a server that stores images for easy display on the web

Last night, more than one of the planet’s friends posted that the pictures on their websites and articles were all changed into Gitee ICONS. !

I didn’t know the truth at the time and thought, how can a platform as big as Gitee fail? What’s the matter with you?

I’m sure that if it was an official issue, it would affect a lot of project documentation using Gitee as a chart bed. I did a random GitHub search for a few projects, and sure enough, many of the ICONS in the project documentation turned out to be Gitee.

Don’t underestimate the impact of this! On the one hand, there are a lot of jokes, like the one below, which is sponsored by Gitee:

Some authors’ drainage and reward TWO-DIMENSIONAL codes all become Gitee ICONS, which directly affects the author’s income! (One day, the author has not found, please advertise ~)

Student’s blog turned into this…

So I went to the Internet for a simple survey, there are many small partners have encountered this problem, that is estimated to be the official pot.

Then I went to Gitee, found my graphic bed repository (a code repository for storing images), found a random image, went to the Image view page (path includes BLOB), and clicked on raw data to see the original image:

It is possible to open the image by skipping (the address of the original image page does not contain the blob) :

Then I simply copied the address of the image, refreshed the page, and lost sight of the image. Press F12 to listen for the network request and find that the image request does not get the correct response and instead gets a favicon.ico:

Just guess, this ICO file is indeed the Gitee icon!

So why does a jump from Gitee’s own page to the actual image address show the image, while direct access to the address is blocked?

Gitee obviously adds anti-theft link to the image. In general, the server will read the Referer from the request header of the client and determine whether the Referer header is in the whitelist to determine whether the normal response image is blocked or not.

To test this, let’s do another experiment. First, open the real address of Gitee picture directly with Firefox browser, and as expected, it cannot be displayed:

Then we go to the F12 developer tools to find the image request, click Edit and re-print it:

We then add a Referer to the previous request to indicate which page to redirect to:

Sure enough, the image responded:

It seems that this Gitee wave really was anti-theft, with no notice (until I posted, no notice either). Everyone was dumbfounded:

Now that this has happened, regardless of whether Gitee officials have temporarily or permanently added anti-theft links, I do not recommend that you continue to use Gitee as a map bed (it also has a 1-megabyte image size limit). Instead, use stable object storage services provided by qiuniuyun, or cloud vendors like Tencent/Alibaba.

I wrote a graphic bed building tutorial a long time ago: “Use Typora + PicGo to improve the efficiency of writing a hundred times”, we are interested in reading.

Here are a few things you can do if you’ve been affected by Gitee:

  1. Example Find a new object storage service

  2. Package the Gitee repository code, download it and upload it in its entirety to the new object storage service (keep the path consistent)

  3. Use a text editor to batch replace the image link prefix (gitee.com/xxx) with the new storage service link prefix

Alas, think about all the trouble… Therefore, if conditions permit, we still recommend you to save the image to your own server (object storage service), more secure and assured.