Check for image before adding img tag.