Remove unused images and enhance image links