- '<img src="' + feature.attributes.img + '" border="0" width="30" height="30"> '
+ (feature.attributes.img ? '<img src="' + feature.attributes.img + '" border="0" width="30" height="30"> ' : '')
http://de.selfhtml.org/javascript/sprache/bedingt.htm#entweder_oder
Mathias