Recently, some developers found that after transferring the code base from Gitee to GitHub, the images in the image library could not be loaded. This issue has attracted many people's attention and questions. Let's take a look at what is going on?
First of all, we need to understand the image storage methods of Gitee and GitHub. Gitee uses Gitee's picture bed service to save the pictures uploaded by users on the Gitee server. GitHub stores images in the user's own warehouse, which means that users need to manage and maintain these images themselves.
When the user transfers the code base from Gitee to GitHub, the image path in the image library will also change. Since Gitee and GitHub use different image storage methods, the paths of these images cannot match. Therefore, when accessing these images in the browser, it will prompt that the image cannot be loaded.
So, how to solve this problem? In fact, the solution is also very simple: just re-upload these images on GitHub, and then replace the image addresses in the code library and image library with the addresses on GitHub. The specific operations are as follows:
1. Create an image warehouse on GitHub and upload the images that need to be uploaded to the warehouse.
2. Find the part in the code base that needs to replace the image address, and replace the original image address with the address on GitHub.
3. After submitting the modification to the code base, just access the pictures in the picture library.
It should be noted that when replacing the image address, pay attention to whether the path is correct. If the path is incorrect, the image still won't load.
In short, after transferring the code base from Gitee to GitHub, the problem of images failing to load is not a big problem. Just re-upload the image and replace the image address to solve the problem. Hope this article can be helpful to everyone.
The above is the detailed content of Why can't I see the pictures transferred from gitee to github?. For more information, please follow other related articles on the PHP Chinese website!