This article is also called: boring, I made a Graphic bed It also sets the automatic upload of blog post images, and how to use the graphic bed instead ZBlog Picture attachments, unfilled zblog blog acceleration guide, Chevereto graphic bed installation tutorial, modified a graphic bed plug-in, etc.
Because the blogger's website is purely a hobby and does not operate a website, this blog has always been placed on a Hong Kong cloud server with the lowest configuration.
Although few people turn it on one day, the loading speed of occasionally turning it on makes people want to drop the monitor.
I bought a Tencent Cloud on the impulse of Double 11. I originally wanted to transfer my blog record to Tencent Cloud, but finally I didn't want to get out of trouble.
It's a sudden impulse these days, or put the blog pictures on Tencent Cloud, which can improve the loading speed.
Baidu found that Chevereto had a good evaluation, so it installed this.
Chevereto is a PHP bed mapping program, with free and paid versions. In fact, the difference between free payment and free payment is not significant.
Chevereto installation process
Go first GitHub Download the installation package. The latest is 1.3.0 Version 。
Check the installation requirements of Chevereto:
Apache or Nginx
PHP 5.6+and standard libraries.
Mysql
Because I use Nginx, I need to configure it before installing. If it is Apache, the installation package already contains the. htaccess file, so there is no need to do extra configuration.
Add the following content to the nginx configuration file of the website. If you use a pagoda, you can set it on the website, Pseudo static Paste and save directly in.
## Disable access to sensitive files location ~* /(app|content|lib)/.*\. (po|php|lock|sql)$ { deny all; } ## CORS headers location ~* /.*\. (ttf|ttc|otf|eot|woff|woff2|font.css|css|js) { add_header Access-Control-Allow-Origin "*"; } ## Upload path for image content only and set 404 replacement location ^~ /images/ { location ~* (jpe?g|png|gif) { log_not_found off; error_page 404 /content/images/system/default/404.gif; } return 403; } ## Pretty URLs location / { index index.php; try_files $uri $uri/ /index.php?$ query_string; }
It must be configured before installation, or installation will lead to 404
The next step is to upload and install, which is very simple, so I don't need to explain more.
After entering the background, the interface is in English. Click the user name in the upper right corner and select Dashboard from the drop-down menu
Select Settings, click Website, select Languages, and switch the default language to Chinese.
If the language does not change after switching, continue to click the user name in the upper right corner, select Settings from the drop-down menu, drag it to the bottom, and select Simplified Chinese in Language.
Next, you can make some personalized settings according to your personal needs, which will not be explained here.
Because the map bed is only for saving blog pictures, all redundant functions are disabled. The website operation mode is personal, and the website privacy mode is only registered users.
Select API on the dashboard and write down the APIv1 key. This is useful later.
Go to the home page and have a look. The map bed is ready.
Next, enter the performance time of zblog
We have a map bed. How can we transfer the images of zblog articles to the map bed? We can't manually transfer them to the map bed and copy the image links. Go back to zb to send articles and insert images?
This is troublesome. The other is that the links of articles and pictures in the zb database have become the links of the map bed. If you suddenly want to stop using the map bed that day, you have to change the pictures one by one.
It's time to show ZB's powerful expansion capability.
Let me introduce ZB free plug-in: N-in-one graphic bed
After using this plug-in, the uploaded picture in zb will automatically upload another copy to the graph bed. The picture of the article content is still the ZB default picture link, and the browsing article will automatically be replaced by the graph bed link.
In the future, I don't want to use the external link of the graphic bed. I can just close the plug-in directly, which has no impact on the article and image.
However, there is a problem. Although this plug-in has various built-in graph beds, it is impossible to have our own graph beds
So, we need to change it.
The specific change process will not be discussed. The modified plug-in will be downloaded later for direct use.
Install and enable the modified plug-in, enter the settings, and fill in the self built map bed API: your map bed website/api/1/upload.
Fill in the previously obtained APIv1 key in the self built graph bed KEY.
preservation.
Send an article to test, and find that the foreground image address has become our map bed, while the background image is still the default image attachment address of ZB.
Done, finish!
Resource download