updated getRawAttachment to getAttachmentImage with a better callback