How to set up the 'Document Image' or 'Thumbnail' feature in AnqiCMS backend so that images are displayed correctly on the front page?

Calendar 👁️ 68

Manage and display images in AnQi CMS, especially document thumbnails or cover images, which is a core link in website content operation.AnQi CMS provides flexible backend configuration and a powerful template tag system, allowing you to easily display these images correctly on the front page.This article will guide you step by step on how to set up and call it, ensuring that your website images are presented in **status to the visitors.

Backend settings article: Ensure that the image processing is done properly

In AnQi CMS backend, there are several key areas that affect images, especially the generation and processing of thumbnails.

Content settings: The 'central kitchen' for website image processing

First, let's go to the "background settings" menu and select "Content Settings".Here is like the 'central kitchen' of website image processing, all images (including document images) uploaded will be processed according to the rules here.

  1. Thumbnail processing method and size: This is the core that determines the final form of the thumbnail

    • Thumbnail Processing MethodYou can choose to 'scale proportionally by the longest side', 'fill by the longest side', or 'crop by the shortest side'.This directly affects whether the thumbnail is displayed fully, automatically padded with white space, or centered and cropped.Choose the most suitable method based on the design style of your website, for example, if you want all thumbnails to maintain the same aspect ratio and fill the background, you can choose 'Fill to the longest side'.
    • Thumbnail sizeSet width and height here.If you find that the image size does not match or is blurred when you call the thumbnail in the template, it is likely that the settings here do not match the size required by the template.Adjust it to the size displayed on your website's frontend, which can effectively improve the image quality.For example, your article list needs to display a 200x150 pixel thumbnail, which should be set to 200x150.
  2. Automatic image compression and WebP formatThese settings are closely related to website performance.

    • Whether to automatically compress large imagesIf enabled, the system will automatically compress the uploaded large image to the specified width, which can significantly reduce the size of the image file and speed up page loading.
    • Automatically compress to a specified width: Used in conjunction with the previous item, you can define the maximum width of the image.
    • Whether to enable WebP image format: Enabling WebP can further compress image size while maintaining visual quality, which is very helpful for improving website speed and SEO.Once enabled, all subsequent JPEG, PNG images uploaded will be automatically converted to WebP format.
  3. Default thumbnailThis is a very practical 'backup' option.If you do not upload a specific thumbnail when publishing a document, the system will use the image set here as the default thumbnail.This ensures that all documents in the list or detail page will have a unified image display even if it is not manually added, avoiding blank or abnormal display.

Document or category editing: source of image upload and extraction

Under the \

  1. Document image (thumbnail)In editing documents, there is a special 'Document Picture' field.You can manually upload an image or select from the existing 'image library'.This is the most direct way to set the document thumbnail.
  2. Automatically extract thumbnails: AnQi CMS is very intelligent!If you publish a document without manually uploading or selecting "Document Image", but the document content contains images, the system will automatically extract the first image in the document content as the thumbnail of the document.This means that even if you forget to set it, as long as there is an image in the content, the front-end can display a thumbnail.
  3. Category and single page thumbnail/Banner imageIn editing the 'Document Category' or 'Page Management' single page, you will also see similar 'thumbnail' or 'Banner image' fields.They function similarly to document thumbnails and are used to display corresponding images on category list pages, category detail pages, or single pages.

Template invocation: Display images correctly on the front end

After the backend is properly set up, the next step is how to correctly call and display these images in the frontend template.The Anqi CMS adopts a template engine syntax similar to Django, using specific tags and variables to retrieve data.

In the Anqi CMS template files, you need to use{{变量}}to output data, using{% 标签 %}To perform logical control or retrieve list data.

1. Thumbnails are displayed on the document list page.

On your article or product list page (usually){模型table}/list.htmlin this type of template), you will usearchiveListTag to loop display documents.

{% archiveList archives with type="page" limit="10" %}
    {% for item in archives %}
    <li>
        <a href="{{item.Link}}">
            <h5>{{item.Title}}</h5>
            {# 关键:调用缩略图 #}
            {% if item.Thumb %}
            <img alt="{{item.Title}}" src="{{item.Thumb}}">
            {% else %}
            {# 如果没有缩略图,可以显示默认图或占位图 #}
            <img alt="{{item.Title}}" src="{% system with name='SiteLogo' %}">
            {% endif %}
            <div>{{item.Description}}</div>
        </a>
    </li>
    {% empty %}
    <li>
        当前分类没有任何内容。
    </li>
    {% endfor %}
{% endarchiveList %}

Related articles

How to optimize website URL display and SEO effects through AnQi CMS's pseudo-static and 301 redirect functions?

In today's highly competitive online environment, a website's URL (Uniform Resource Locator) is not only the address of the content but also a key factor affecting user experience and search engine rankings.A clear and meaningful URL can enhance the professionalism of a website and help search engines better understand page content, thereby optimizing SEO effects.AnQiCMS provides two core functions, pseudo-static and 301 redirect, for URL optimization, allowing users to easily build a website structure that is more friendly to search engines and users.### Optimize URL Display

2025-11-09

How to configure multi-language content in AnQi CMS to ensure that users of different languages can browse the website normally?

Our Anqi CMS provides an efficient and flexible solution for multilingual content configuration, aimed at helping us easily meet the needs of global content promotion.It cleverly distinguishes between system-level language settings and the localization of website content and templates, allowing us to finely manage content in different languages and ensure that users of different languages can browse the website smoothly.Next, we will learn how to configure multi-language content in Anqi CMS and ensure its smooth operation.### Understanding the multilingual mechanism of AnQi CMS In AnQi CMS

2025-11-09

How to customize the Anqi CMS content model to meet the personalized display needs of different types of content?

Today, with the increasing sophistication of content operation, personalized display of website content has become a key to attracting users and enhancing user experience.AnQiCMS (AnQiCMS) provides us with powerful tools with its flexible content model, allowing us to customize the structure and display of content according to various business needs.This article will delve into how to flexibly use the content model in Anqi CMS, making your website content more distinctive and practical.

2025-11-09

How to use the “Recommended Attributes” feature of Anqi CMS to flexibly display specific content on the front page?

When operating a website, we always hope to prioritize the most important and popular content for visitors, so that the focus area of the website can always present the freshest and most attractive information.Manually updating this content is time-consuming and prone to errors. Fortunately, Anqi CMS provides a very practical 'recommended attribute' feature that allows us to easily achieve flexible content display and automated management.What is the "recommended attribute" feature of Anqi CMS?In simple terms, 'Recommended Properties' is like putting a special tag on your website content

2025-11-09

What are the conditions under which the "Custom URL" feature of Anqi CMS takes effect, and how can uniqueness be ensured to optimize content display?

Our company, Anqi CMS, has provided us with many flexible and powerful tools in content operation, among which the "Custom URL" feature is a very valuable feature.It not only relates to the website's search engine optimization (SEO), but also directly affects the perception and trust of users in the content.So, under what circumstances does this custom URL feature take effect, and how can we ensure its uniqueness to optimize content display? ### The activation time of the custom URL function In AnQi CMS, the custom URL is not always in the "working state".

2025-11-09

How to use the "Scheduled Publishing" feature of AnQi CMS to automatically display content on the front end according to a plan?

In daily website content operation, maintaining continuous updates and accurate targeting is the key to attracting users and enhancing website activity.However, manually publishing content is often limited by factors such as time and personnel.AnQiCMS (AnQiCMS) fully understands the pain points of operators and has specially provided the powerful and practical function of "scheduled release" to help users achieve automated content management and automatically display content on the front page according to the plan.

2025-11-09

How to configure the 'Advanced SEO Tool' of AnqiCMS to improve the visibility of a website in search engine result pages?

In today's digital age, making your website stand out in the vast sea of internet information and easily discoverable by potential users is one of the keys to success.Search engine optimization (SEO) is the important way to achieve this goal.AnqiCMS as an efficient content management system, deeply understands the importance of SEO, and therefore built-in powerful advanced SEO tools to help users systematically improve the visibility of their websites on search engine result pages (SERP).Next, we will delve into the various SEO settings of AnqiCMS

2025-11-09

How to quickly refresh the front-end display after updating the website content strategy or URL in AnQi CMS's 'Content Replacement' feature?

## Website Content Update and Front-end Refresh Secret: Detailed Explanation of AnqiCMS "Content Replacement" Function Content updates and URL structure optimization are common in the daily operation of a website.Whether it is the upgrade of the brand name, the replacement of specific keywords, or the reconstruction of page links, these changes are directly related to the visitor experience and search engine ranking of the website.However, if the website contains a large amount of content, manually modifying it one by one is undoubtedly a time-consuming and labor-intensive huge project, and it is also prone to errors.

2025-11-09