added filetype changing to image locations