code: public static boolean isImage(File file)
    {
      return file != null ? IMAGE_FILE_EXTENSIONS.contains(Files.getExtension(file)) : false;
    }
docs: Guess if file is an image file based on file extension. This is a very trivial test relying on file extension and
  obviously cannot guarantee correct results.
  
  @param file file to test.
  @return true if given file is an image file.