---
title: imageFileTypes()
framework: appkit
role: symbol
role_heading: Type Method
path: appkit/nsimagerep/imagefiletypes()
---

# imageFileTypes()

Returns the file types supported by the image representation class or one of its subclasses.

## Declaration

```swift
class func imageFileTypes() -> [String]
```

## Return Value

Return Value An array of NSString objects, each of which contains a filename extension or HFS file type of a supported format.

## Discussion

Discussion The list includes both those types returned by the imageUnfilteredFileTypes() class method plus those that can be converted to a supported type by a user-installed filter service. The returned file types can include encoded HFS file types as well as filename extensions. Don’t override this method when subclassing NSImageRep—it always returns a valid list for any subclass of NSImageRep that correctly overrides the imageUnfilteredFileTypes() method.

## See Also

### Determining Types for Images

- [canInit(with:)](appkit/nsimagerep/caninit(with:)-6zv56.md)
- [canInit(with:)](appkit/nsimagerep/caninit(with:)-56pum.md)
- [imageTypes](appkit/nsimagerep/imagetypes.md)
- [imageUnfilteredTypes](appkit/nsimagerep/imageunfilteredtypes.md)
- [imagePasteboardTypes()](appkit/nsimagerep/imagepasteboardtypes().md)
- [imageUnfilteredFileTypes()](appkit/nsimagerep/imageunfilteredfiletypes().md)
- [imageUnfilteredPasteboardTypes()](appkit/nsimagerep/imageunfilteredpasteboardtypes().md)
