How to configure AnQiCMS to automatically generate thumbnails for uploaded images?

Calendar 78

In website operation, high-quality images can significantly improve user experience and content attractiveness.However, the original large image not only occupies valuable server space, but also slows down the website loading speed, affecting SEO performance.AnQiCMS as an efficient content management system has fully considered this point, providing users with a flexible and powerful automatic thumbnail generation function for images.By configuring it reasonably, you can enable the system to intelligently handle uploaded images, automatically generate thumbnails that meet the needs of your website, and achieve a balance in the visual presentation and performance optimization of the website content.

This article will provide a detailed introduction on how to configure the automatic thumbnail generation for images in AnQiCMS, and offer some practical tips to help you fully utilize this feature.

Set up easily: Let AnQiCMS intelligently process your images

The AnQiCMS automatic thumbnail feature is located in the "Content Settings" backend. Just a few steps, and you can let the system automatically complete the繁琐繁琐的图片处理 work.

  1. Enter the content settings:First, log in to your AnQiCMS backend management interface.Find "Background Settings" in the left navigation bar, click to expand and select "Content Settings".Here is a gathering of all important configuration items related to the website content, including image processing strategies.

  2. Understand key options:On the "Content Settings" page, you will see a series of options related to image processing. These options collectively determine how AnQiCMS generates, optimizes, and manages your image resources.

    • Whether to automatically compress large imagesThis option is the core switch to control whether AnQiCMS compresses the size of uploaded images.Enable this feature to effectively prevent users from uploading large images, thereby saving server storage space and improving page loading speed.If your website does not need to display original-size oversized images, it is strongly recommended to enable this feature.

    • Automatically compress to a specified widthWhen you enable the 'Auto-compress large images' option, this option will appear accordingly, used to set the maximum width of the image after compression.The default width is usually 800 pixels. You can adjust this value according to the actual design and image display needs of the website.Please note that compressing the large image will only judge and process it based on the width, and the height will be automatically adjusted in proportion.

    • Thumbnail Processing MethodAnQiCMS offers three flexible thumbnail generation methods to adapt to different visual effects and layout needs:

      • Scale proportionally to the longest side:This method maintains the original aspect ratio of the image, scales the image to the specified size, ensuring the image is displayed completely.The thumbnail width or height will be fixed to the set value, and the other side will adjust automatically in proportion.
      • Pad to the longest edge:If you want the thumbnail image to have a fixed size (such as square), and do not want to cut off any content, you can choose this method.The image will be centered, and the unused part will be filled with white.
      • Trim to the shortest edge:This method ensures that the thumbnail fills the entire specified size area, but may crop the edges of the image.The image will be cropped to center, with the shortest side fully displayed, and the longest side cropped to match the shortest side.

      You can choose the most suitable processing method based on the style and requirements of the website images.

    • Thumbnail sizeHere, you can set the specific dimensions for the system to generate thumbnails (for example:200x150This size will directly affect the thumbnail size displayed on the page.It is crucial to set an appropriate size, which can ensure the clarity of the image, effectively reduce the size of the image file, and accelerate the rendering speed of the page.

    • Whether to enable Webp image formatWebP is a modern image format developed by Google, which has smaller file sizes than JPEG and PNG formats at the same quality.After enabling this feature, AnQiCMS will automatically convert the JPG, PNG, and other images you upload to WebP format.This is very helpful for further optimizing website performance and storage space.Please note that this setting only takes effect for new images uploaded after it is turned on, and if old images need to be converted to WebP, you can use the "Webp conversion tool" provided by the system.

    • Default thumbnailThis option allows you to upload a default image as a backup for the thumbnail.When the document or content does not upload a dedicated thumbnail, the system will automatically display this default image to ensure the consistency and integrity of the website images, avoiding the appearance of blank or missing images.

    • batch regenerate thumbnailsThis is a very practical maintenance feature. If you adjust the thumbnail size or processing method mentioned above, but also want these changes to apply to the images uploaded earlier, you can use the 'Batch regenerate thumbnails' feature.Clicking will cause the system to process all images according to the new settings and generate new thumbnails, saving the trouble of manual processing.

How to call automatically generated thumbnails on a page?

AnQiCMS after completing the automatic image processing, will provide a very convenient way to call the thumbnail.In your template file, you can directly use specific tags to display these images.

For thumbnails uploaded in the background for "Add Document", "Document Category", or "Page Management", the system will store their addresses in the correspondingThumbin the field. For example, when looping to output the article list:

{% archiveList archives with type="list" limit="10" %}
    {% for item in archives %}
        <a href="{{item.Link}}">
            <img alt="{{item.Title}}" src="{{item.Thumb}}"> {# 这里直接调用了缩略图 #}
            <h5>{{item.Title}}</h5>
            <div>{{item.Description}}</div>
        </a>
    {% endfor %}
{% endarchiveList %}

In addition, AnQiCMS provides a generalthumbThe filter, even if the image is not uploaded through the document or category thumbnail field, can generate and call a thumbnail through its original URL if it is an image hosted within the system. This is very useful when you need to dynamically handle any image link in the template:

<img src="{{ '/uploads/2023/example.jpg'|thumb }}" alt="一张图片">

By these simple yet powerful configuration and calling methods, AnQiCMS makes the management and optimization of website images easier than ever before.

Summary

The AnQiCMS automatic thumbnail generation feature is an indispensable tool for website content operation and performance optimization.It can not only help you automatically process images, save time and effort in manual operations, but also effectively improve the loading speed and user experience of the website.By flexibly configuring compression options, thumbnail size, and processing methods, you can create visually appealing and efficient content that meets the characteristics and needs of the website, laying a solid foundation for the success of the website.


Frequently Asked Questions (FAQ)

Q1: How did I not see the thumbnail effect of the image I uploaded, and it is still displaying the original image on the page?

A1:There may be several reasons for this situation. First, please check if you have enabled "Auto-compress large images" and set the "Thumbnail size" correctly in your "Content Settings".Secondly, if your image was uploaded before changing the settings, you may need to use the 'Batch regenerate thumbnails' feature to update the old images.Finally, do not forget to call the thumbnail field correctly in your website template (for example, `{{item

Related articles

How to apply the `thumb` filter to the image URL in the AnQiCMS template?

In website content operation, images play a crucial role, as they can not only attract users' attention but also effectively convey information.However, the original large image that has not been optimized often becomes a bottleneck in website loading speed, affecting user experience and even search engine rankings.AnQiCMS fully understands this and has provided a simple yet powerful tool for content operators to solve this problem - that is the **`thumb` filter`**.Then, how is the `thumb` filter applied to the image URL in the AnQiCMS template?

2025-11-08

How to use the `thumb` filter to get a thumbnail image in AnQiCMS?

In a content management system, image thumbnails play a crucial role.They can not only accelerate page loading speed and optimize user experience, but also maintain visual consistency in various layouts, especially in list pages, recommendation positions, and other scenarios, which is particularly important.AnQiCMS (AnQi Content Management System) provides us with a convenient way to manage and access these thumbnails, where the `thumb` filter is a powerful tool to achieve this function.

2025-11-08

How to set the SEO title, keywords, and description for a single page in AnQiCMS, and customize its template?

Managing website content in AnQiCMS, a single page (or independent page) is a very practical feature, such as common pages like "About Us", "Contact Information", and so on.These pages' content is relatively fixed, but its SEO performance and display form are crucial for the overall image and user experience of the website.AnQiCMS is designed with SEO-friendliness in mind and provides flexible template customization capabilities, allowing us to easily set up unique SEO information and customize the display templates for each single page.

2025-11-08

How to build a multi-level menu and display it on the front end using the AnQiCMS navigation list tag (`navList`)?

The navigation system of the website is the core bridge for users to interact with content, especially for sites with rich content or deep levels, a clear and efficient multi-level menu is crucial.AnQiCMS provides a powerful and flexible navigation list tag (`navList`), allowing you to easily build and display a fully functional multi-level menu.To make full use of the navigation function of AnQiCMS, we need to start from the background configuration and then proceed to the rendering of the front-end template, step by step building the menu structure we desire.### One, Back-end Navigation Configuration

2025-11-08

What thumbnail processing methods does AnQiCMS provide (such as cropping, scaling, padding)?

In website operation, high-quality image content is undoubtedly the key to attracting users and enhancing brand image.While thumbnails, as the first impression of content, their display effect directly affects the user's willingness to click and the overall browsing experience.Luckyly, AnQiCMS provides very flexible and powerful features for image processing, especially for thumbnails, allowing us to easily achieve various thumbnail effects according to different scenarios and design requirements.### Smart Thumbnail, making image management more convenient AnQiCMS deeply understands the pain points of content operators, especially in image processing

2025-11-08

How to customize the thumbnail size and ratio generated by AnQiCMS

In content operation, images are an important element to attract readers, and standardized, beautiful thumbnails are even more critical to the visual consistency and loading speed of the website.AnQiCMS fully considered this point and provided us with flexible thumbnail customization features.If you wish to adjust the thumbnail size and display ratio of the automatically generated thumbnails by AnQiCMS to present your website content with a more professional visual effect, this article will provide you with detailed guidance.

2025-11-08

How does AnQiCMS automatically extract an image as a thumbnail when no thumbnail is uploaded?

In website content operation, thumbnails play a crucial role.It is not only the first visual entry for articles, products, and other content, but also directly affects the click-through rate, and is also a key factor in the layout aesthetics of list pages, recommended positions, and the like.However, many times when we publish content, we may forget to upload a thumbnail, or we may want the system to handle it automatically for efficiency reasons.How does AnQiCMS intelligently generate thumbnails for our content without manual upload?AnQiCMS designed a considerate mechanism to solve this problem.When you are posting an article

2025-11-08

How to set a global default thumbnail in AnQiCMS?

In website operation, content release is a core link, and images, as visual elements, are crucial for attracting readers and enhancing the professionalism of the content.However, sometimes when publishing articles, products, or single-page websites, due to carelessness or time pressure, it may be that the appropriate thumbnail was not uploaded in time, which may lead to the page being displayed incomplete, or even showing placeholder images of broken pictures, affecting the user experience and the overall image of the website.In order to solve this problem, AnQiCMS provides a very practical feature: setting a global default thumbnail.Through this setting, regardless of whether you have uploaded a custom thumbnail for your content

2025-11-08