Expand my Community achievements bar.

SOLVED

Image crop in html5smartimage xtype

Avatar

Level 3

Hi,

I'm using AEM 6.1 and I'm using OOTB Text and Image component to upload & crop images. When I crop the image, I get imageCrop properties populated with x,y,width,height values. This crop values differs with my local and DEV environment. I used the same image with same cropping in my local and in my DEV environment. 

With little more debugging, I found the value differs only when I crop images of width and height which exceeds 1000px (say 1920x1200). I read the documentation for html5smartimage and it says "the value depends on the serverside implementation"

What does the serverside implementation refers to? And why do I see a difference in values being stored in my local and DEV (with same image and same cropping applied)?

 

https://docs.adobe.com/docs/en/aem/6-1/ref/widgets-api/index.html?class=CQ.html5.form.SmartImage

cropParameter : String

Name of the form field used for posting the cropping rect; use null or a zero-length String if the cropping tool should be disabled; the value depends on the serverside implementation; use "./imageCrop" for CQ foundation's image component; "./image/imageCrop" for the textimage component

Regards,

Ruben

1 Accepted Solution

Avatar

Correct answer by
Level 4

I don't know precisely what the issue is but here are a couple things to check. Make sure your local and dev instances both have the same service packs & cumulative fix packs. In general it's not uncommon to see subtle variations like this when your AEM instances aren't all the same. Also, sometimes the cache of AEM javascript clientlibs under /var/clientlibs/libs becomes obsolete and doesn't reflect the javascript that is installed under /libs. To be safe, back up /var/clientlibs/libs and then delete /var/clientlibs/libs and then check if the cropping behaves as expected. As you reload your cropping test page, AEM should rebuild it's cache of javascript clientlibs at /var/clientlibs/libs. 

View solution in original post

3 Replies

Avatar

Correct answer by
Level 4

I don't know precisely what the issue is but here are a couple things to check. Make sure your local and dev instances both have the same service packs & cumulative fix packs. In general it's not uncommon to see subtle variations like this when your AEM instances aren't all the same. Also, sometimes the cache of AEM javascript clientlibs under /var/clientlibs/libs becomes obsolete and doesn't reflect the javascript that is installed under /libs. To be safe, back up /var/clientlibs/libs and then delete /var/clientlibs/libs and then check if the cropping behaves as expected. As you reload your cropping test page, AEM should rebuild it's cache of javascript clientlibs at /var/clientlibs/libs. 

Avatar

Administrator

Hi,

I'm using AEM 6.1 and I'm using OOTB Text and Image component to upload & crop images. When I crop the image, I get imageCrop properties populated with x,y,width,height values. This crop values differs with my local and DEV environment. I used the same image with same cropping in my local and in my DEV environment. 

With little more debugging, I found the value differs only when I crop images of width and height which exceeds 1000px (say 1920x1200). I read the documentation for html5smartimage and it says "the value depends on the serverside implementation"

What does the serverside implementation refers to? And why do I see a difference in values being stored in my local and DEV (with same image and same cropping applied)?

 

https://docs.adobe.com/docs/en/aem/6-1/ref/widgets-api/index.html?class=CQ.html5.form.SmartImage

cropParameter : String

Name of the form field used for posting the cropping rect; use null or a zero-length String if the cropping tool should be disabled; the value depends on the serverside implementation; use "./imageCrop" for CQ foundation's image component; "./image/imageCrop" for the textimage component

Regards,

Ruben



Kautuk Sahni

Avatar

Level 1

The largest image rendered in AEM is according to the configurations in "Day CQ DAM Buffered Image Cache" service. As the image cross the size of 1024px(default), the image is resized. But your local has some different value(I guess). Please refer below URLs, it might help.

 

https://helpx.adobe.com/experience-manager/kb/remove-web-rendition-dimension-limit.html

https://helpx.adobe.com/experience-manager/kb/cqbufferedimagecache-consumes-heap-during-asset-upload...

Regards

Srikant

https://helpx.adobe.com/experience-manager/kb/remove-web-rendition-dimension-limit.html

https://helpx.adobe.com/experience-manager/kb/cqbufferedimagecache-consumes-heap-during-asset-upload...