small fix for image extraction in case of empty data