As a senior security CMS website operator, I am well aware of the importance of the quality and loading speed of website content to user experience and search engine optimization.Images are an important part of a website's content, and their handling strategy is of great importance.In response to the question you raised regarding whether Anqi CMS can set different compression strategies for different types of images, I will elaborate in detail on the functional features of Anqi CMS for you.

In Anqi CMS, image optimization is not simply setting different compression qualities based on file types (such as JPG, PNG), but rather through a more comprehensive and practical strategy to enhance image efficiency.This strategy primarily focuses on image format conversion, size control, and thumbnail generation methods, aiming to globally optimize the loading performance and storage space of website images.

Firstly, Anqi CMS provides a global image format optimization feature, which supports automatically converting uploaded JPG and PNG images to WebP format.This feature is enabled in the background "Content Settings" after which the system will automatically perform the conversion when uploading images.The WebP format is known for its excellent compression rate, which can significantly reduce file size without visibly compromising visual quality, thereby speeding up page loading and enhancing user experience and search engine ratings.This means that no matter what JPG or PNG images you upload, once WebP conversion is enabled, they will all be processed and stored in WebP format for display, thus achieving a unified and efficient compression strategy at the format level.

Secondly, for the original large image uploaded, AnQi CMS provides automatic size compression functionality.When the image file size is large, the system can automatically resize it proportionally based on the preset width limit.This feature aims to reduce server storage space usage and ensure that even original images that have not been resized can be loaded more efficiently.Users can enable this feature in the "Content Settings" and set a target width (default 800 pixels), the system will compress all large images that meet the conditions according to this width.This compression mainly focuses on the uniformity and reduction of image size to meet the display requirements of web pages, rather than directly adjusting the image quality parameters.It applies to all types of original large images, to unify their maximum display size.

Finally, Anqi CMS provides a more refined control strategy for generating thumbnails to meet the needs of different content displays. The system supports three main thumbnail processing methods, which can be considered as strategies for different 'use types' (i.e., thumbnails):

  • Scale proportionally to the longest side:This method ensures that the image content is displayed completely, by maintaining the original image aspect ratio, scaling the longest side to the specified size, and the other side is automatically adjusted in proportion.It is suitable for those who need to display the entire image but also require control over the overall size.
  • Pad to the longest edge:While maintaining the integrity of the image content centered, fix the width and height of the image to the preset size.The parts of the image that are insufficient will be filled with white to fit the fixed thumbnail frame.This is very useful for the scenario where it is necessary to strictly unify the thumbnail display box size and not to crop the image.
  • Trim to the shortest edge:This method will crop the image centrally, preserving the integrity of the shortest edge, while the longest edge is proportionally cropped to match the shortest edge, which may result in the loss of part of the image edges, but can ensure the output is a fixed size thumbnail.When strict size requirements are placed on thumbnails and partial cropping is acceptable, this strategy is more suitable.

The operation personnel can flexibly select these thumbnail processing methods in the "Content Settings" and specify the specific thumbnail size.These strategies are designed specifically for thumbnails of different purposes, such as list display, cover images, etc., to balance visual effects and loading performance.

In summary, AnQi CMS provides WebP format conversion, automatic size compression for large images, and various flexible thumbnail generation strategies, enabling multi-dimensional image optimization based on the different roles of images on the website (such as original large images, list thumbnails).Although there are no direct options such as 'compression quality percentage' specifically set for JPEG or PNG file types, these features have been able to effectively improve the loading efficiency of website images and the overall user experience, meeting the core needs of website operators in terms of image optimization.


Frequently Asked Questions (FAQ)

Q1: Does AnqiCMS support setting different compression quality percentages for JPEG and PNG files?The AnQi CMS itself does not provide a direct function to set different compression quality percentages for JPEG or PNG file types.The image optimization strategy is mainly reflected in the global conversion to WebP format, automatic size compression of large images, and various thumbnail generation methods.Through these features, the system optimizes file format, physical size, and display purposes, rather than adjusting the compression quality parameters of different source file types in a granular manner.

Q2: After enabling the WebP format conversion, what changes will the original JPG/PNG images undergo?Once the WebP format conversion is enabled in the background "Content Settings", all newly uploaded JPG and PNG images will be automatically converted to WebP format for storage and use.For images that have already been uploaded in a non-WebP format, the system provides a "Batch regenerate thumbnails" feature, which can also convert these existing images to WebP format in batches, ensuring the format consistency and optimization of all site images.

Q3: Whether the thumbnail settings will affect the size or quality of the original uploaded image?The thumbnail settings of AnqiCMS are based on generating new, processed small-sized images from the original image.These settings (such as zoom, cropping method, and target size) will not directly modify the original large image file you upload.The original image will be processed according to the "Automatic Compression of Large Image" rules, while the thumbnail will be generated based on its independent settings, and both are mutually independent but related versions of the image.