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

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.
