In case the image has no caption we don't need to render the markup wrapping the caption. [MAILPOET-6280]