Why is it necessary to set a default thumbnail?

How to set the default thumbnail in Anqi CMS?

The process of setting the default thumbnail in Anqi CMS is very intuitive, you just need to perform simple operations in the "Content Settings" on the backend.

  1. Go to content settings:Firstly, please log in to your security CMS backend. In the left navigation bar, you will see the "Backend Settings

  2. Find the default thumbnail option:)After entering the "Content Settings" page, scroll down, and you will find an option named "Default Thumbnail". This setting is specifically used for handling documents that do not have a specific thumbnail.

  3. Upload or select a default image:In the "Default Thumbnail" settings area, you will see a button to upload or select an image.

    • If you have already prepared an image as the default thumbnail, you can directly click the button to upload.
    • If your image is already in the image resource library of Anq CMS, you can also click to select, and pick from the existing images. Suggest choosing a universal image that represents your website theme or brand as the default thumbnail.
  4. Save settings:Choose or upload an image and don't forget to click the 'Save' button at the bottom of the page to ensure your changes take effect.

Until now, you have successfully set a default thumbnail for the website.In the future, when there is no thumbnail uploaded for a document, and there is no first image available for the system to automatically extract from its content, the system will automatically display the default thumbnail you set here.

Further optimize the thumbnail display effect

In addition to setting the default thumbnail, the "Content Settings" page also provides other powerful features related to thumbnails, which can help you finely control the display effect of website images:

  • Thumbnail size:
  • Thumbnail processing method:Auto CMS provides three flexible thumbnail processing methods to meet different design scenarios:
    • Scale proportionally by the longest edge:This method will display all sides of the image completely, maintaining the original image ratio, ensuring that the image does not distort.
    • Pad by the longest edge:The width and height of the image will be fixed, the image will be centered, and any part that is not sufficient will be filled with white (or other specified color), suitable for scenes that require strict uniform dimensions.
    • Crop by the shortest edge:The image will be cropped to center, the shortest edge will be fully displayed, and the longest edge will be cropped to match the length of the shortest edge.If your images often have irregular shapes, but you need to display them uniformly in a square or fixed aspect ratio, this method can keep the central content of the image from being cropped, but there may be some loss at the edges.

When you adjust the thumbnail sizes or processing methods, you can use the 'Batch regenerate thumbnails' feature to process existing images on the website according to the new settings in bulk, ensuring that all thumbnails remain consistent.

The application of the default thumbnail in the template

When you call the thumbnail of the document in the template, for example using{{item.Thumb}}or{{archive.Thumb}}tags, Anqi CMS will intelligently match and display images according to priority:

  1. 优先显示已上传的文档缩略图:English如果文档手动上传了缩略图,则显示该图。English
  2. 其次自动提取文档内容图片:EnglishIf the document does not have a manually uploaded thumbnail but contains images, the system will automatically extract the first image as the thumbnail.
  3. Finally, use the default thumbnail:Only when neither of the above two conditions is met, will the system automatically call the default thumbnail you set in the background.


Common Questions (FAQ)

Q1: If I set a default thumbnail but then upload a dedicated image for a document, which one will be displayed first?A1: If you upload a dedicated thumbnail for a document, the system will display the image you uploaded first.默认缩略图仅在文档没有专属缩略图,且内容中也未包含任何图片时才会生效,确保了内容的个性化展示。

Q2: After setting the default thumbnail, will it affect the display of images in the article content?A2: No. The default thumbnail only affectsThumbnailThe display of articles, card displays, and other scenarios that require small image previews.It will not change the display style or size of images in the article content.The images in the article content will be displayed according to the settings you inserted in the editor.

Q3: Can I set different default thumbnails for different types of content (such as articles, products)?A3: According to the current settings of AQ CMS, the "default thumbnail" provided in the "content settings" of the backend is a default setting for the entire site. It applies to all documents that do not specify a thumbnail.If you need to set different default thumbnails for different content models (such as articles, products), you may need to implement logical judgments at the template level, or customize an image field for each content model in the background and make use of it.