### Method

# Gimp Image get_file

since: 2.8

#### Declaration [src]

    GFile*
    gimp_image_get_file (
      GimpImage* image
    )

#### Description [src]

Returns the file for the specified image.

This procedure returns the file associated with the specified image. The image has a file only if it was loaded or imported from a file or has since been saved or exported. Otherwise, this function returns `NULL`. See also gimp-image-get-imported-file to get the current file if it was imported from a non-GIMP file format and not yet saved, or gimp-image-get-exported-file if the image has been exported to a non-GIMP file format.

Available since: 2.8

#### Return value

Type: `GFile`

The file.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.