In website operation, images are indispensable elements to attract visitors and convey information, and thumbnails play a key role in enhancing the beauty and loading efficiency of pages in scenarios such as content lists and article recommendations.As the design of the website evolves, the diversity of display devices increases, and the demand for performance optimization continues to rise, the original thumbnail size or format may no longer be applicable.For example, to improve website loading speed, convert all images to a more efficient WebP format, or to adapt to the new responsive layout, you need to adjust the thumbnail display size.

Dealing with this situation, manually processing a large number of images one by one is undoubtedly a time-consuming and labor-intensive task.Fortunately, AnQiCMS is well-versed in this and has provided us with an efficient solution: batch regenerate thumbnails to adapt to new display sizes or formats, keeping the website in good visual and performance condition.

Why do you need to regenerate thumbnails in bulk?

You may have encountered such a situation:

  1. Website revision and upgrade:When introducing a new design or page layout, the new theme template may have different requirements for the size and aspect ratio of thumbnails, and old thumbnails may appear to be improperly cropped, blurred, or out of proportion.
  2. Adapt to responsive design:With the increase in the number of mobile device visits, websites need to provide thumbnails optimized for different screen sizes to ensure a good visual experience on smartphones, tablets, and other devices.
  3. Performance Optimization and New Format:To enhance the loading speed and user experience of websites, it has become a trend to convert image formats from traditional JPG, PNG to more efficient WebP format.But simply enabling WebP for uploading new images is not enough; it is also necessary to convert the existing thumbnail images to WebP.
  4. Adjust the image processing method:Whether you want the thumbnail to be scaled proportionally to the longest side, cropped to the shortest side, or padded to the longest side, an update to the existing thumbnails is required when these processing methods change.

The intelligent thumbnail processing mechanism of AnQiCMS

AnQiCMS has always been very intelligent and flexible in image processing.When we upload images, the system will automatically generate thumbnails based on preset rules and will process accordingly according to the global settings.These core settings are concentrated in the "Content Settings" backend, you can configure according to the actual needs of the website:

  • WebP image format enabled:You can choose whether to automatically convert the uploaded image to WebP format, thereby significantly reducing the image size without sacrificing too much quality.
  • Automatically compress large images:For the original large image uploaded, AnQiCMS supports automatic compression to the specified width, effectively saving storage space and speeding up page loading.
  • Thumbnail size:You can customize the default thumbnail size to ensure that the image size is uniform and meets the design requirements when displayed on the front end.
  • Thumbnail processing method:The system provides multiple processing options, such as 'proportional scaling by the longest edge' to display the image in full; 'filling by the longest edge' to display at a fixed size and centered, with white filling for the insufficient part; or 'trimming by the shortest edge' to ensure clear display of a specific area.

These flexible configurations lay the foundation for bulk thumbnail regeneration.

When and how to operate bulk thumbnail regeneration.

Because AnQiCMS provides such a detailed image processing mechanism, when you adjust these global settings (such as thumbnail size, processing method, or WebP enabled status) and want these new settings to apply to all uploaded images, the batch regeneration feature becomes particularly important.

The operation process is very intuitive:

  1. Adjust global settings:Firstly, navigate to the AnQiCMS backend, go to the "Backend settings"under the "Content settingsPage. Here, you can adjust the various image processing parameters mentioned above as needed, such as changing the default thumbnail size, selecting a new thumbnail processing method, or enabling the WebP image format (if not previously enabled).
  2. Trigger batch generation:After completing the settings modification, at the bottom of the page, you will find a name calledbatch regenerate thumbnailsThe options
  3. Perform the operation:Click this option, and the system will reprocess and generate new thumbnails for all uploaded images based on all thumbnail sizes, processing methods, and WebP enabled status you have configured in the "Content Settings".This is an automated process, AnQiCMS will traverse all the image resources on the website that need to generate thumbnails and generate the corresponding new thumbnail files according to the latest rules.

This feature greatly saves the time and energy of content operators, eliminating the need for manual modification of each page, ensuring the consistency of the website's visual presentation and performance optimization.

Tips before operation

It is crucial to develop good habits before performing any batch operations:

  • Data backup:Although the AnQiCMS system is stable and reliable, it is strongly recommended to make a complete backup of the website data and files before performing batch operations for safety's sake.
  • Please check the settings carefully:Please confirm that the parameters you have adjusted in the "Content Settings" are as expected, especially the thumbnail size and WebP conversion options, to avoid generating results that do not meet the requirements.
  • Choose an appropriate time slot:Batch image processing may increase the server load in a short period of time. If your website has a high volume of traffic, it is recommended to perform operations during the low traffic hours of the evening or early morning.
  • Clear the cache:After the batch operation is completed, the website front-end may not display the updated thumbnail immediately due to browser cache or CDN cache reasons.At this time, it is usually recommended to clear the website cache (AnQiCMS backend has the "update cache" function) and the browser cache, and refresh the CDN cache if necessary, to ensure that the newly generated thumbnails can take effect as soon as possible.

The batch thumbnail regeneration feature of AnQiCMS is not just a technical tool, but also a powerful assistant for content operators to improve efficiency, optimize user experience, and SEO performance.It allows websites to quickly adapt to the ever-changing network environment and user needs, maintaining competitiveness.


Frequently Asked Questions (FAQ)

Q1: Will bulk thumbnail regeneration affect the normal access to the website?A1: Batch re-generating thumbnails is a resource-intensive operation that may increase the CPU and I/O load on the server in a short period of time.Although AnQiCMS focuses on high performance and concurrency handling in design, theoretically it will not lead to a complete website outage, but to ensure a pleasant user experience, it is still recommended that you choose to perform this operation during periods of low website traffic to avoid potential loading delays.

Q2: If I only want to regenerate the thumbnail images under specific categories or models, does AnQiCMS support it?A2: Currently, the "Batch Regenerate Thumbnails" feature in AnQiCMS backend is a global operation for all image resources on the site, and it is not possible to specify to process only images under a specific category or model.If you have such a need, you can consider verifying it in a test environment, or through other technical means (such as directly operating the thumbnail folder under the file storage directory, but this requires caution and a deep understanding of AnQiCMS's file storage structure).

Q3: After regenerating thumbnails in WebP format, will my old format images (such as JPG, PNG) still be retained?A3: When you enable WebP format in the AnQiCMS content settings and perform batch regeneration of thumbnails, the system will create or replace the existing thumbnails with WebP format. In most cases, the original uploaded large image files (such as JPG or PNG) will be retained, and the old format will be kept.thumbnail fileWill be replaced by new WebP thumbnail image files. This means that when users visit, they will load WebP thumbnails, but your media library may still contain the original JPG/PNG large images.Specific behavior should be validated in the test environment to ensure it meets your expectations.