The website is operational, the display effect of the picture materials is crucial.Sometimes, due to the update of the website template, the adjustment of the design style, or for the consideration of optimizing performance, the front page of the website will propose new requirements for the display size of image thumbnails.In this case, how can a large number of images uploaded to AnqiCMS (AnqiCMS) be generated into appropriate thumbnails according to new size requirements instead of manually processing one by one, which has become a concern for many users.
AnqiCMS fully considers the actual needs of content operators, built-in convenient thumbnail batch processing functions, allowing users to easily cope with such changes.We will introduce in detail how to take advantage of this feature of AnqiCMS to efficiently regenerate thumbnails in batches.
Why do we need to regenerate thumbnails in bulk?
Before delving into the operation steps, let's first understand why we need to regenerate thumbnails in bulk:
- To adapt to new designs or templates:When the website changes the theme template or adjusts the layout of the existing template, such as article lists, product display pages, category pages, etc., these pages may require thumbnails of different proportions or sizes to achieve the**visual effect.
- Improve loading speed and user experience:The original large image displayed directly will increase the page loading burden.Accurately generate thumbnails based on the actual display area, which can significantly reduce the size of image files, thereby speeding up page loading and enhancing user experience.
- Optimize SEO performance:Uniform image size and processing methods help search engines better understand and capture website content, and also have a positive effect on image SEO optimization.
Important reminder before operation.
Please note the following points before performing any batch operations:
- Data backup:It is strongly recommended to make a complete backup of the website database and files before performing batch operations.Although AnqiCMS is well-designed in terms of functionality, backup is the most effective means of ensuring data security in case of emergencies.
- Confirm the new size:Understand the new thumbnail size (width and height) required for the front-end page, as well as the desired thumbnail processing method, which helps to configure it all at once.
- Storage space:Thumbnail regeneration will create new image files on the server, which may occupy additional storage space. Please ensure that the server has enough space to support this operation.
The detailed steps for AnqiCMS to batch regenerate thumbnails
The batch thumbnail regeneration feature of AnqiCMS is integrated in the content settings, with a very intuitive operation process.
Step 1: Enter the content settings interface
Log in to the AnqiCMS admin panel. In the left navigation menu, find and click on 【Admin Settings】, then select 【Content Settings】.This is all the global configuration items related to the website content.
Step 2: Adjust thumbnail size and processing method (if needed)
On the 'Content Settings' page, you will see multiple options related to image processing, including 'thumbnail processing method' and 'thumbnail size'.
- Thumbnail processing method:AnqiCMS provides various flexible thumbnail generation strategies:
- Scale proportionally to the longest side:This method maintains the original aspect ratio of the image, scaling the longest side to the specified size, and the other side proportionally. The image content is complete, but may not match the display area size perfectly.
- Pad to the longest edge:The image content is displayed completely, the extra space is filled with white to the specified size. Suitable for those who require strict size consistency and do not mind white space.
- Trim to the shortest edge:The image will be cropped in the center, ensuring the shortest edge reaches the specified size, and any excess on the longest edge will be cut off.This method can ensure strict size matching, but may lose some image content. According to the new display size requirements of the front-end page, choose the most suitable processing method.
- Thumbnail size:According to your new display size requirements on the front page of your website, enter the width and height of the thumbnail (for example:
200x150indicating width 200 pixels, height 150 pixels).
Step 3: Execute batch regeneration
After adjusting the "thumbnail processing method" and "thumbnail size" (you can also directly set it here if you haven't changed it before) and scrolling down the page, you will see an option named "Batch regenerate thumbnails".
Click the [Batch regenerate thumbnails] button next to this option.A confirmation prompt will pop up to inform that this operation will regenerate thumbnails for all images uploaded on the entire site.After confirming that it is correct, click the “OK” button.
Step 4: Confirm and wait
Click to confirm and the system will start processing tasks in the background. This process time depends on the number of images on your website and the server performance.Please be patient and avoid closing the page or performing other high-load operations during the task execution.After the task is completed, there is usually a successful prompt.
Check and optimize after regeneration
After batch regeneration of thumbnails is completed, some checks and follow-up optimizations are required:
- Clean up system cache:Refresh the AnqiCMS system cache. Find the [Update Cache] option in the background menu, click to execute cleaning, and ensure that the new image path and size settings take effect immediately.
- Clear browser cache: Please clear the browser cache (Ctrl+F5 or Command+R to force refresh) when accessing the website's front page to ensure that the latest thumbnails are loaded.
- Check the front-end display:Please carefully check all key pages on the front-end (such as the home page, list page, detail page, etc.), and confirm that the thumbnails are displayed normally according to the new size and processing method without any stretching, blurring, or improper cropping.
- Continuous performance monitoring:If the number of images is large, it is appropriate to pay attention to the CPU and storage space usage of the server to ensure the stable operation of the website.
Tip
To better utilize the AnqiCMS image processing function, here are some additional suggestions:
- Design first:When designing a website template, it should be planned well for the image sizes and proportions of different areas, so that it will be more convenient for content release and maintenance later on.
- Set default values reasonably:In the "Content Settings", in addition to the thumbnail size, you can also set the "default thumbnail", which will be used as a substitute when the article does not upload a specific thumbnail, to maintain the visual consistency of the website.
- Utilizing WebP format:AnqiCMS supports the "Enable Webp image format" feature, turning on this option will automatically convert uploaded JPG, PNG images to WebP format, further reducing image size, and improving loading speed.
By following these steps, you can easily meet the needs of changing the thumbnail display size on the front page, keeping your AnqiCMS website always maintaining the **visual effect and running performance.
Frequently Asked Questions (FAQ)
Q1: Will the operation of regenerating thumbnails affect the original image? Will my original image file be deleted or modified?A1: Thumbnail regeneration usually does not directly modify or delete your original image file.AnqiCMS will generate a new thumbnail image file for each picture according to the new settings and store it in the specified location.The front page will display these new thumbnails, the original large image will continue to be retained as a backup or for other purposes.
Q2: If my website has a large number of images, will it take a long time or affect website access to regenerate thumbnail images in bulk?A2: Yes, if the number of images is very large, the batch generation process may indeed take a long time and may occupy server resources to some extent (such as CPU).It is recommended to choose a time slot with lower website traffic (such as late at night or early in the morning) to perform this operation to minimize the impact on user experience.
Q3: After regenerating the thumbnail, I found that the image display in a certain area is still incorrect, what could be the reason?A3: This may be due to various reasons. First, please make sure you have completely cleared the system cache of AnqiCMS and your browser cache.Next, check the template code in this area, confirm whether it correctly calls the thumbnail field generated by AnqiCMS (for example{{item.Thumb}}or{{item.Logo}}). In addition, please check whether the 'thumbnail processing method' and 'thumbnail size' set in the 'content settings' match the actual display requirements of the area.