Uses the filenames instead of the destination file when checking whether it has an image file extension