correcting image filetype