Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

custom crop Image options

Avatar

Avatar
Validate 1
Level 2
srikanthg212933
Level 2

Likes

4 likes

Total Posts

37 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
srikanthg212933
Level 2

Likes

4 likes

Total Posts

37 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
srikanthg212933
Level 2

03-04-2020

Hi , 

 

I would like to add more crop options to AEM asset editor. currently we have few like 2:3 and 3:5 and etc.

How can I achieve this. Is there any file I can customize. sample example would be great help.

 

And currently original image is overwritten by cropped image. Is there an option to form new image instead of overwriting existing .

 

Thanks

AEM 6.5 Asset image

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,282 likes

Total Posts

3,156 posts

Correct Reply

891 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,282 likes

Total Posts

3,156 posts

Correct Reply

891 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

10-04-2020

Create a clientlibs of  coralui3 with below code

 

(function () {
"use strict";

CUI.imageeditor.plugins.Crop.ASPECT_RATIOS = [
{name: '10_to_9', ratio: 0.9},
{name: '3_to_2', ratio: 0.667},
{name: '2_to_1', ratio: 0.5},
{name: '3_to_5', ratio: 0.5714},
{name: '7_to_5', ratio: 0.714},
{name: '14_to_5', ratio: 0.357},
{name: '9_to_5', ratio: 0.55}
];

CUI.imageeditor.plugins.PluginRegistry.register('crop', CUI.imageeditor.plugins.Crop);

for (var key in CUI.imageeditor.strings) {
if (CUI.imageeditor.strings.hasOwnProperty(key)) {
CUI.imageeditor.strings[key]["crop.aspect_ratios.10_to_9"] = "10 : 9";
CUI.imageeditor.strings[key]["crop.aspect_ratios.3_to_2"] = "3 : 2";
CUI.imageeditor.strings[key]["crop.aspect_ratios.2_to_1"] = "2 : 1";
CUI.imageeditor.strings[key]["crop.aspect_ratios.3_to_5"] = "5 : 3";
CUI.imageeditor.strings[key]["crop.aspect_ratios.7_to_5"] = "7 : 5";
CUI.imageeditor.strings[key]["crop.aspect_ratios.14_to_5"] = "14 : 5";
CUI.imageeditor.strings[key]["crop.aspect_ratios.9_to_5"] = "9 : 5";
}
}

})();

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
MVP
Theo_Pendle
MVP

Likes

236 likes

Total Posts

251 posts

Correct Reply

105 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile

Avatar
Validate 1
MVP
Theo_Pendle
MVP

Likes

236 likes

Total Posts

251 posts

Correct Reply

105 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile
Theo_Pendle
MVP

03-04-2020

As far as I know there is unfortunately no easy way to do this. You'll have to write some code.

You can find an answer here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-assets/asset-editor-croppi...