Expand my Community achievements bar.

DM Classic - S7 - Show default image when a specific Image or Vignette object not found | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

DM Classic - S7 - Show default image when a specific Image or Vignette object not found by Sreekanth Choudry Nalabotu

Abstract

Missing Product Image

In Dynamic Media Classic (S7), if the image (specified in URL with others modifiers) is NOT found, you can serve a default image by adding parameter &defaultImage. This helps when there are new images for a product not published yet or missing for some reason, so when users clicks the link or the specific swatch, a default image for the product is shown (instead of a broken or generic 404 image...)

Image not found URL eg: http://sample.scene7.com/is/image/S7trainRender/image_does_not_exist
With &defaultImage URL parameter: http://sample.scene7.com/is/image/S7trainRender/image_does_not_exist?defaultImage=ninewest_shoe

Unavailable Vignette Object
While serving an Image Render or Vignette (composed of objects) if the Object name is NOT found, there is no default image parameter here and error Object not found is shown...

Sample Object not found URL : http://sample.scene7.com/ir/render/S7trainRender/ninewest_shoe?wid=300&obj=object_does_not_exist&color=200,40,60

Workaround below is for showing a default product image when specified object name (in url parameters) is unavailable...

Github - https://github.com/schoudry/eaem-extensions/tree/master/eaem-65-extensions/eaem-dm-classic-s7-vignette-default-image

1) For running this sample with code in a local file and image we are requesting existing on a different domain (http://sample.scene7.com/) with CORS headers not set in response... we need to tone down chrome security a bit...

Read Full Blog

DM Classic - S7 - Show default image when a specific Image or Vignette object not found

Q&A

Please use this thread to ask the related questions.



Kautuk Sahni
Topics

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

1 Reply

Avatar

Level 2

We have a default "No Image Available" asset that we have set to display when there isn't a product image available, or if--for example--the image url has not been concatenated correctly on our end in the call to the Dynamic Media Classic IS and IR servers.  However, we've been documenting, with increased frequency, instances of the "No Image Available" asset being served up when there is nothing wrong with the image url.  As I am sent examples of these seemingly broken urls from colleagues, I can open them in their own browser window and they load fine.  But, when they're part of a product page with numerous other images, there are times when the image won't load and will instead display this default missing image asset.  We do tend to use complex image urls on the IS image server where we are layering numerous assets on top of each other.  Additionally, our vignettes use a lot of rendered overlap image layers, so the our image urls can get to be long and complicated.  I am just in the early process of troubleshooting this issue and wonder if you have advice for me.  Should I be looking for an image timeout setting somewhere, possibly on our side or in DMC settings?  Any thoughts on what else could be causing the No Image Available asset to display when the image url is valid.  I appreciate any help!