removing refs to images