How to get width and height of remote images from Next Generation Dynamic Media remote assets | Community
Skip to main content
New Participant
December 13, 2023
Solved

How to get width and height of remote images from Next Generation Dynamic Media remote assets

  • December 13, 2023
  • 1 reply
  • 628 views

We have Next Generation Dynamic Media set up, so we can select and use remote images for any of components that may contain an image. I'm trying to figure out how I can get the width and height of this image if it is remote.

 

I know how to do it with local images by checking the renditions, but I'm not sure what to do for remote images. I was thinking of just using the image url with BufferedReader to get the image details, but I was wondering if there's some built in way to do it through one of Adobe's libraries. 

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 Saravanan_Dharmaraj

@ishaja i assume when you say remote, you mean from DM. If you have enabled the smart crop in DM and the renditions are created , it will be available in DM. You can check the different renditions from DM using ?req=set,json at the end of the DM Image URL. 

Again if you have smart crop , you already know what rendition to deliver for an image for different form factors

 

ex: https://s7d1.scene7.com/is/image/siliconlabssandbox/WW-Summit-Reg-Banner-2000x870?req=set,json 

 

Smart Crop : https://experienceleague.adobe.com/docs/experience-manager-learn/assets/dynamic-media/images/smart-crop-feature-video-use.html 

1 reply

Saravanan_Dharmaraj
Saravanan_DharmarajAccepted solution
New Participant
December 14, 2023

@ishaja i assume when you say remote, you mean from DM. If you have enabled the smart crop in DM and the renditions are created , it will be available in DM. You can check the different renditions from DM using ?req=set,json at the end of the DM Image URL. 

Again if you have smart crop , you already know what rendition to deliver for an image for different form factors

 

ex: https://s7d1.scene7.com/is/image/siliconlabssandbox/WW-Summit-Reg-Banner-2000x870?req=set,json 

 

Smart Crop : https://experienceleague.adobe.com/docs/experience-manager-learn/assets/dynamic-media/images/smart-crop-feature-video-use.html