Limitations on Smart Crops for Source Images with Extreme Aspect Ratios | Community
Skip to main content
FreedomMarketin
Level 4
June 1, 2023
Solved

Limitations on Smart Crops for Source Images with Extreme Aspect Ratios

  • June 1, 2023
  • 1 reply
  • 1266 views

We are getting an error when trying to generate a Smart Crop on a very narrow image (32x1200).  Dynamic Media is throwing an error: "The supplied auto-swatch generation parameters (SmartCrop) led to an invalid swatch. No auto-swatch operation was applied to this image." 

 

Our Smart Crop swatch parameters are 30x30, so the image is not too narrow to generate a swatch in theory.  Adobe's documentation doesn't seem to list a minimum width or aspect ratio where Smart Crops do not work. 

 

Is anyone aware of what constraints exist for Smart Crops for the source file?  We're using the Smart Crops programmatically, so we need to avoid trying to generate Smart Crops for problem files, but we're not sure what attributes to use to avoid Smart Crops.  I supposed we could add a try / catch, but that seems inelegant.

 

Thanks!

Beau

 

Background: AEM 6.5 SP16 in AMS connected to Dynamic Media.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by vikasbharti

Hello @freedommarketin 

According to the official documentation, for the successful application of a smart crop, it is advised that image assets have a minimum size of 50 x 50 pixels or larger. This guideline can be found in the "Guidelines" section of the following help article: https://experienceleague.adobe.com/docs/experience-manager-65/assets/dynamic/image-profiles.html?lang=en#crop-options

I hope this help.

1 reply

vikasbhartiAdobe EmployeeAccepted solution
Adobe Employee
June 2, 2023

Hello @freedommarketin 

According to the official documentation, for the successful application of a smart crop, it is advised that image assets have a minimum size of 50 x 50 pixels or larger. This guideline can be found in the "Guidelines" section of the following help article: https://experienceleague.adobe.com/docs/experience-manager-65/assets/dynamic/image-profiles.html?lang=en#crop-options

I hope this help.

FreedomMarketin
Level 4
June 2, 2023

Perfect!  Thank you for the quick reply!