Expand my Community achievements bar.

SOLVED

Java model for Dynamic Media renditions

Avatar

Level 1

Hello, we are including Dynamic Media services in our AEM environments and we have a question about the renditions.

 

Currently, without the Dynamic Media we have a java model that administers and manages the different renditions of the images. Now we are implementing the use of Dynamic Media and we are wondering if a similar model is necessary because we don't know if this rendition management is already provided directly by Dynamic Media itself, or if it is done using, for example, the Auto mode in the Smart Crop renditions.

 

So do we need to manage the renditions by ourselves through java, or would we be creating unnecessary and repeated code? And if we do not use the Smart Crop car, do we need this model?

 

Basically, I mean a model that manages which rendition of an image is the most appropriate to display according to the screen size, so that to the original image path it adds the extension of the rendition that it want to use. In the case of images in the Dynamic Media it would take the renditions already created under the path of the Dynamic Media itself.

 

Thanks in advance,

Paula

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 7

Hi @PaulaMrtnez ,

Dynamic Media in AEMaaCS inherently manages renditions and delivery of images based on factors like screen size, device type, and network speed. Here’s a breakdown addressing your question:

1. Dynamic Media Rendition Management
Dynamic Media includes features such as:

If you are leveraging these features, Dynamic Media handles the selection and delivery of the best rendition. Thus, maintaining a Java model for rendition selection might be redundant.

 

2. Custom Rendition Management
If you do not rely on Smart Crop Auto mode or other Dynamic Media automation features, you may still need a custom solution:

  • Scenario Without Smart Crop: In this case, a model might be required to select appropriate renditions based on your specific logic (e.g., business rules or custom screen size mappings).
  • Custom Image Renditions: If you need to control the rendition names or structure outside what Dynamic Media provides, a Java model can help integrate those.

3. Recommended Approach
Given that Dynamic Media is built to optimize rendition management:

  • Avoid Redundancy: If you fully adopt Dynamic Media features like Smart Crop and Smart Imaging, you likely do not need a separate model to manage renditions.
  • Fallback Plan: If business requirements dictate that Smart Crop or Dynamic Media automation is not suitable, a lightweight Java model could act as a fallback for selecting and appending renditions.

Dynamic Media simplifies and automates much of what your Java model likely accomplishes. Unless specific requirements conflict with the automation, integrating with Dynamic Media’s capabilities is preferable.

Best regards,

Kostiantyn Diachenko.

View solution in original post

4 Replies

Avatar

Correct answer by
Level 7

Hi @PaulaMrtnez ,

Dynamic Media in AEMaaCS inherently manages renditions and delivery of images based on factors like screen size, device type, and network speed. Here’s a breakdown addressing your question:

1. Dynamic Media Rendition Management
Dynamic Media includes features such as:

If you are leveraging these features, Dynamic Media handles the selection and delivery of the best rendition. Thus, maintaining a Java model for rendition selection might be redundant.

 

2. Custom Rendition Management
If you do not rely on Smart Crop Auto mode or other Dynamic Media automation features, you may still need a custom solution:

  • Scenario Without Smart Crop: In this case, a model might be required to select appropriate renditions based on your specific logic (e.g., business rules or custom screen size mappings).
  • Custom Image Renditions: If you need to control the rendition names or structure outside what Dynamic Media provides, a Java model can help integrate those.

3. Recommended Approach
Given that Dynamic Media is built to optimize rendition management:

  • Avoid Redundancy: If you fully adopt Dynamic Media features like Smart Crop and Smart Imaging, you likely do not need a separate model to manage renditions.
  • Fallback Plan: If business requirements dictate that Smart Crop or Dynamic Media automation is not suitable, a lightweight Java model could act as a fallback for selecting and appending renditions.

Dynamic Media simplifies and automates much of what your Java model likely accomplishes. Unless specific requirements conflict with the automation, integrating with Dynamic Media’s capabilities is preferable.

Best regards,

Kostiantyn Diachenko.

Avatar

Level 2

If you are currently using custom code to generate static renditions and populate your front-end with an array of renditions for a responsive experience then there will most likely be an impact to your end solution when changing to dynamic media.  There is a lot of existing code within the out of the box templates and components when running in dynamic media mode. You may or may not like the OOTB solution but if you don't like the implementation you can certainly do whatever you want on the component end of things while leveraging all of the benefits of Dynamic Media for on-the-fly image rendering, presets, optimization and CDN delivery.

Avatar

Level 1

Hi,

1.No, you don't need a Java model for managing renditions unless you have specific custom processing requirements that Dynamic Media cannot fulfill. Dynamic Media can handle image size, cropping, and format generation automatically.

2.If you don't use Smart Crop or Auto mode, you can still manage renditions manually, but this would likely be redundant unless you have a very specific use case.

Avatar

Administrator

@PaulaMrtnez Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni