Skip to content

Instantly share code, notes, and snippets.

@JumboLove
Created September 19, 2013 20:42
Show Gist options
  • Save JumboLove/6629544 to your computer and use it in GitHub Desktop.
Save JumboLove/6629544 to your computer and use it in GitHub Desktop.
Check if Image Exists
var imgFile : dw.io.File = dw.io.File('/Catalogs/'+catalogId+'/default/' +imagelocation);
var imgFileExists : Boolean = imgFile.exists();
//OR
var img = File('/LIBRARIES/Sitename/default/images/'+mycustomobject.custom.name);
if (!img.exists()) // replace this image url with a default one;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment