Improve id setting on extractedimages.