Image Size Reduction & Cropping Options

 

In Sales Layer it is possible to automate the creation of different sizes for each of your images. This option is available from the Form Editor screen, selecting the Image Field and clicking on the Configure option where you can manage the image sizes.

Managing the size of images
Managing the size of images

As you can see, by default Sales Layer creates three sizes, which are also used internally on the platform, as well as the original image which is always kept. 

When creating a new image size you can specify its width, height, and resolution (as a percentage), as well as provide a name by which you can identify the new image size. This way you can create, for example, a main image for your website or even thumbnails of different sizes. Once you click on Confirm, all your existing images will be transformed to include this new size. Any new ones you add later on will be processed in all sizes you have configured.

When it comes time to export your data using a connector you have the option of choosing which image sizes you want to export.

Warning: There are several aspects to take into account. If you have several images in a field and you have configured a crop type, that crop type will be applied to all those images. If you have "more suitable" selected, the original formats of the images will be maintained.

Note: When creating different image sizes, Sales Layer will generate versions in PSD, JPG, or PNG depending on whether they have a transparent background or not. All the different versions are created in RGB format. If the original is CMYK we apply a different version of Adobe filters to design a version as faithful to the original as possible. If it still differs, we recommend using an original in RGB.

 

Image file names

 

There are a few things to keep in mind about the image file names:

  • File names can be changed in certain cases. Spaces are not replaced in the original image, but they are replaced in the different sizes in the account, according to internal, non-customizable criteria.
  • We strongly recommend to avoid using non-recommended digits for file names. Any special character can cause problems when working with these files, such as the use of spaces, accents, or characters such as: “ · % { ¨ ´ ; / -< > ^[ ? * +, etc.
  • When the connector ejects the .Org file, the name it uses is the one originally set, even if changed later. If you want to eject the name of the file in its latest version and with the same nomenclature with which the rest of the sizes are exported, you need to apply the formula PRINT({name_of_field.org.org).
  • When the connector ejects an image thumbnail, the name by which the URL is built is based on the original product name. If the name of a product is modified, the URLs of its thumbnails will not vary the fragment of the URL that corresponds to the name of the product.
  • Using the formula PRINT({product_image}) you can extract names from images. This formula ejects image names that are saved in the respective fields of Sales Layer. Although you have created cutouts, they do not have different names. So even if we use the formula PRINT({product_image.name.THM}) you will always get the same result.
  • To remove URLs from the cuts you need to indicate the cut in the formula. For example, to eject the THM size you will use the following formula: PRINT({product_image.THM}).
  • The formula {product_image.all.THM} returns the URL of the image files in case of multiple ones.
  • To return the first THM size image of the image you need to use the formula {product_image.1.THM}
  • It is not possible to combine different sizes in a formula. For example, if you want to obtain the .org and .sz1 sizes (or .source, etc.) you will not be able to use {product_image.org.sz1}.

 

 Image cropping option

 

When creating a new size, you can activate or deactivate the Crop option. If you choose it, the system analyzes various points of the image and, depending on the size chosen, adapts the image and fills the new spaces with a background of the same color as the original image.

By deactivating the Crop option, the system tries to adapt the image to the chosen size, leaving the chosen space blank.

You can see the difference between the two options in the following examples:

 Without resizing to 700x950, original size - 506x900
Option “Crop”. Resize 700x950
Resize 700x950
 6.2  Option “Crop” deactivated. Chosen size 700x950, original size - 506x900

Warning: If the image does not have a clearly distinguishable background, the system will not be able to apply the "Crop" option and the result will show the cropped image. For example, in the following image, there is no distinguishable background, so the crop will skip part of the content giving the result we see below.

Imagen sin recortar
Example of a cropped image without the background detected properly
Example of a cropped image without the background detected properly