As an experienced AnQi CMS website operation personnel, I am well aware of the importance of website loading speed for user experience and search engine optimization, and images, as an important part of website content, are often the key factors affecting loading speed.The AnQi CMS provides multiple powerful optimization capabilities in the image management function, aimed at helping operation personnel easily enhance website performance.
Speed up website loading speed through the image management function of AnQiCMS
The loading speed of the website directly affects the efficiency of users in obtaining content and their stay time, especially on mobile devices, where users have a very low tolerance for slow-loading pages.Images are at the core of visual content, and if not optimized, can become a huge bottleneck for website performance.The AnQi CMS deeply integrates various image optimization strategies, empowering website operators to efficiently improve website loading speed.
1. Use AnQiCMS content settings to perform image intelligent processing
The AnQi CMS backend "Content Settings" module is the core configuration area for image optimization strategies.By reasonable configuration, we can let the system automatically process images, thereby significantly reducing the file size of image files and improving loading efficiency.
first, Enabled WebP image formatIt is the primary optimization measure. WebP is a modern image format that can significantly reduce the size of image files while providing the same quality, usually 25-34% smaller than JPEG, and 26% smaller than PNG.In Anqi CMS, once WebP format is enabled, all newly uploaded JPG and PNG images will be automatically converted to WebP format.For non-WebP images that have been uploaded, the system providesbatch regenerate thumbnailsThe feature, with one click, can convert all existing images to WebP format, ensuring that all site images enjoy the loading advantages brought by WebP.
secondly,Automatically Compress Large ImageThe feature can effectively avoid page loading slow due to uploading large images.We can set a reasonable image width, such as 800 pixels.When the width of the uploaded image exceeds this set value, the system will automatically resize it proportionally to ensure that the image size is optimized without too much impact on the visual effect.This feature is particularly effective in avoiding performance issues caused by content editors accidentally uploading oversized images.
Furthermore,Fine control over thumbnail processing methods and dimensionsIt is also very important. Anqi CMS provides three thumbnail generation methods such as 'proportionally scale by the longest side', 'fill by the longest side', and 'crop by the shortest side'.Combine the actual page layout and design requirements, choose the most suitable processing method, and set the preciseThumbnail sizeEnsure that the images loaded on the list page, article cards, and other locations are exactly the required small size versions rather than the original image, which greatly reduces unnecessary bandwidth consumption. At the same time, the system also supports settingsDefault thumbnailEnsure that the page has a uniform image display even if a specific thumbnail is not uploaded, to avoid blank spaces or missing icon display.
Finally, for external images that may be referenced in the content,Whether to download remote imagesThe option allows the operator to choose to download external images to the local server.This not only helps to manage image resources centrally, but also avoids affecting the loading speed and stability of the website due to slow response or failure of external servers.
Second, fine-grained operations and maintenance of image resources
The 'Image Resource Management' feature of AnQi CMS is not just a simple file browser, it provides the ability to manage the image lifecycle, which helps maintain the neat and efficient image library.
In the image resource management interface, we can perform imagesCategorizationThis can greatly improve the search and management efficiency for websites with a large number of images.By categorizing images, operation personnel can locate and handle images for specific purposes more quickly, such as storing article illustrations, product display images, Banner images, and the like separately.
Batch operations are the key to improving efficiency. Anqi CMS supportsBatch select images and delete or transfer to a specified categoryThis means that when the image is no longer needed or needs to be reorganized, multiple images can be processed at once, reducing repetitive labor.
The "Image Replacement" feature is particularly noteworthy. When a picture needs to be updated but its URL has been widely referenced, AnQi CMS allows us toReplace the image file without changing the image URLThe system will automatically handle the size difference between new and old images and resize them proportionally according to the compression rules configured in the content settings.This feature is very beneficial for maintaining the images of old articles, updating product images or Banner images, while not affecting existing links and SEO performance.
The operation personnel should check the image resources regularlyFile size and resolutionInformation. Through the picture detail page, you can clearly see these key data of each picture.If a large image is found, you can consider manually optimizing it, or using the system-provided WebP conversion and automatic compression features to process it again.
The third, implementing image lazy loading and precise reference with template tags
On the front-end template level, AnQiCMS also provides tag support to ensure that images are presented to users in the most optimized manner.
Among them,Image Lazy Loading (Lazy Loading)Is a standard practice for modern website optimization. Through the template inimgtags usagelazy="data-src"The attribute can indicate that the browser should only load the image when the user scrolls to the visible area of the image.This can significantly reduce the initial loading time for pages containing a large number of images, as the browser does not need to load all image resources at once.
In addition, the template should be adjusted according to specific requirements,Precisely refer to images of different sizesFor example, large sizes may be used on the article detail pageDocument cover logo (Logo)While on the list page, smaller sizes automatically generated by the system should be referencedDocument cover thumbnail (Thumb). Anqi CMS'sarchiveDetail/categoryDetail/pageDetailAll tags support direct retrieval of these image addresses for different purposes, ensuring that the most suitable image is loaded for each scenario, to avoid resource waste.
By the aforementioned multi-dimensional image optimization strategy, Anqi CMS helps website operators manage and optimize image resources throughout the process of content creation, editing, and publishing, from the source to the front-end display, thereby building a website with faster loading speed and better user experience.
Frequently Asked Questions (FAQ)
1. I have enabled the WebP image format in the background content settings, but why are the old images still in JPG or PNG format on the website front end?The WebP enable feature of AnQi CMS defaults to onlyNew uploadConvert JPG and PNG images automatically. The system will not automatically perform batch conversion for images you have uploaded before enabling this feature.You need to go to the "Content Settings" page to convert these old images to WebP format and find and use the "batch regenerate thumbnailsfunction. This feature will reprocess all uploaded images based on the current settings (including WebP options).
2. I set the automatic compression of large images to a specified width (for example, 800px), but some images on the website still look very large, even exceeding 800px. Why is that?The auto-compress large image feature is mainly aimed atwhen uploadingimages exceeding the specified width for processing. There may be the following situations:
- The original width of the image is less than the specified width:If the original width of the image you upload is less than 800px, the system will not enlarge it.
- The old image has not been reprocessed:The images you upload before setting or changing the compression rules will not be affected by the new rules unless they are reprocessed through the "Batch Regenerate Thumbnails" feature.
- The image is a direct link embedded in the content editor:If the content embeds external image links, and the option 'Download remote images' is not enabled or the link has not been processed by the system, then these images are not subject to the background compression rules.Please check the source of the image and the upload time, and use the batch regenerate thumbnails feature if necessary.
Is the lazy loading feature of AnQi CMS automatically implemented? If not, how can I apply it in the template?The lazy loading feature of Anqi CMS is not fully automated and depends onthe cooperation of the front-end template. Although the system may process the image path internally, the final rendering effect needs to be manually modified in your website template.<img>tag to enable. You need to place it in the template.srcattribute is replaced withdata-src(or any other properties required by your front-end lazy loading library), and load the corresponding JavaScript lazy loading library on the page. For example, if you are retrieving image content from the document detail tag and want to apply lazy loading to the images within it, you can use it like this:{% archiveDetail archiveContent with name="Content" lazy="data-src" %}{{archiveContent|safe}}This will contain the content ofsrcattribute is replaced withdata-srcLazy loading can be achieved by coordinating with a front-end JavaScript library.