Fix deleteImage issue in media manager.