changing gifs to refer to files rather than html encoding them