Every website contains images, and along with this fact comes the need to maintain and modify those images to display in the correct manner. The new image management component of Titan CMS makes this process easy and user-friendly, without the need for complex photo editing software. With Titan CMS you can now crop, resize, and rotate your images. You can also automatically generate different sizes for each of your images. For example, perhaps you would like to automatically generate a small and medium-sized thumbnail of your original image for use in the photo block.
It is important to discuss how differently sized images will interact with the image management component of Titan CMS. This article will clarify how different features of image management are affected by dimensions of images uploaded to the workstation.
Automatic Thumbnail Generation
Titan CMS will automatically generate thumbnails for images uploaded to your file pile. However, it will only generate the sizes configured to be smaller than the original image’s dimensions. For example, you have two thumbnail sizes configured: Large (100 x 100px) and Small (50 x 50px). In this case, if you upload an image that is 75 x 75px, the only thumbnail generated will be the Small size. This prevents Titan CMS from generating thumbnails which are potentially much larger than the original image. Doing so could cause the image to become blurry and pixilated.
Depending on how you have the auto-generation of your thumbnail sizes configured, different rules are applied to decide if the thumbnail size is smaller than the original image. If you use the “Size” attribute in your XML configuration, Titan CMS will simply compare the largest dimension of the original image to the value specified in this attribute. If the original image’s largest dimension is smaller than the value specified here, that particular thumbnail size will not be generated. If the “Height” and/or “Width” attribute is used in the XML configuration, the application will compare the original image’s height and width to those attributes, respectively. If either of those dimensions is smaller than the specified values in your XML configuration, that particular size will not be generated.
Resizing an Image
When resizing an image through the image management wizard, you must decrease the dimensions of the original image. You are not allowed to increase the dimensions such that they are larger than the original image. As an image increases in size, it becomes more pixilated and blurry. Thus, this is done to prevent image distortion.
It is possible to specify specific heights and widths for automatically generated thumbnails. Thus, it is likely that the aspect ratio (e.g. the ratio of height to width) of the original image will not match the aspect ratio of that particular thumbnail size. Depending on the XML configuration for generating the sizes, the application will decide to clip one of the dimensions. This means that Titan CMS will cut off a portion of that dimension, rather than simply resizing it. This is done to prevent distorting the image. Whenever an image is clipped, it will be centered and each side will be clipped evenly. That is, if 10 total pixels needed to be clipped from the width of the image, 5 would be clipped from the left and 5 from the right.
Size for Use In Particular Location is not Generated
As part of your image management configuration, you can define where certain thumbnail sizes are used. For example, you must define what default size is used by the freeform editor, the photo block, etc. There are times, however, when certain sizes aren’t generated for a particular uploaded file (explained above). In these cases, the application will simply use the original file in its place. For example, you have a size defined with the name Large (100 x 100px) that is set as the default size for the freeform editor. If you upload an image that is 50 x 50px, the Large size will not be generated. For this file, the freeform editor will use the original 50 x 50px size as the default.