code: def file(self):
          
          file = None
          if (self.config.klass_name == 'gen'):
              for ext in ['.py']:
                  file = os.path.join(
                      self.config.generator_dir, self.identifier + ext)
                  if (os.path.isfile(file)):
                      return file
          else:
              for ext in ['.jpg', '.png', '.tif']:
                  file = os.path.join(self.config.image_dir,
                                      self.identifier + ext)
                  if (os.path.isfile(file)):
                      return file
          # failed, show list of available identifiers as error
          available = "\n ".join(identifiers(self.config))
          raise IIIFError(code=404, parameter="identifier",
                          text="Image resource '" + self.identifier + "' not found. Local resources available:" + available + "\n")
docs: Filename property for the source image for the current identifier.