Expand my Community achievements bar.

SOLVED

Hiding default static image presets

Avatar

Level 4

HI,

 

We've got 5 static image renditions created on upload to provide thumbnails for Assets to use when displaying the image in card or list view etc.

 

I beliege these are mandatory.

 

See attachment.

 

That's fine - but these are no use for real users of Assets and I'd therefore like to hide them from the 'renditions' panel and as options on download.

 

Has anyone got ideas if that's possible ... and if so how ?

 

Thanks

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi @GeraintJo 

 

Assuming you are interested only in not having them visible in the left panel and not actually prevent AEM from rendering them, I believe you can achieve this using custom JS.

I am not 100% sure, but maybe this the ootb clientlib to which can glue your own custom clientlib.

Tethich_0-1740577877581.png

And then in browser, your custom clientlib can make your renditions not visible, or maybe read-only.

Check this example, which is talking about smartcrops, but maybe you can get some inspiration on the whole idea:
https://experience-aem.blogspot.com/2020/04/aem-6540-assets-dynamic-media-show-specific-rendition-by...

I hope I understood well your issue.

 

View solution in original post

3 Replies

Avatar

Administrator

@diksha_mishra @abhishekanand_ @Albin_Issac @Tethich @AnkurAhlawat @Kamal_Kishor Can you take a quick look at this question? Any guidance you can provide would be much appreciated!



Kautuk Sahni

Avatar

Correct answer by
Level 9

Hi @GeraintJo 

 

Assuming you are interested only in not having them visible in the left panel and not actually prevent AEM from rendering them, I believe you can achieve this using custom JS.

I am not 100% sure, but maybe this the ootb clientlib to which can glue your own custom clientlib.

Tethich_0-1740577877581.png

And then in browser, your custom clientlib can make your renditions not visible, or maybe read-only.

Check this example, which is talking about smartcrops, but maybe you can get some inspiration on the whole idea:
https://experience-aem.blogspot.com/2020/04/aem-6540-assets-dynamic-media-show-specific-rendition-by...

I hope I understood well your issue.

 

Avatar

Level 7

Hi  @GeraintJo ,

Adding to @Tethich inputs, you can hide the renditions from the server side based on some conditions by overlaying the file -/libs/dam/gui/coral/components/admin/unifiedrenditions/staticrenditions/staticrenditions.jsp with your custom logic. For example, I could hide the renditions by updating the variable hideRendition to true from false. I would recommend adding your own logic per your requirement to hide the renditions.

 

narendiran_ravi_0-1740932590002.png

 

narendiran_ravi_1-1740933072141.png