logic in ImageMetadataComponentGenerator simplified