<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSImageView/animates",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSImageView(py)animates"
  },
  "title" : "animates"
}
-->

# animates

A Boolean value indicating whether the image view automatically plays animated images.

```
var animates: Bool { get set }
```

## Discussion

When the value of this property is <doc://com.apple.documentation/documentation/Swift/true>, the image view plays animated images automatically using the timing and looping characteristics stored in the image data. The default value of this property is <doc://com.apple.documentation/documentation/Swift/true>.

Decoding an animated GIF file is the only way to create an animated [`NSImage`](/documentation/AppKit/NSImage) object. If the image view has been assigned an image that was created from animated GIF data, setting this property to <doc://com.apple.documentation/documentation/Swift/true> enables automatic playback of the animation. If this property is set to <doc://com.apple.documentation/documentation/Swift/false>, only the first frame of an animated image is displayed.

Loading an animated GIF file using an [`NSImage`](/documentation/AppKit/NSImage) object produces an image that uses an [`NSBitmapImageRep`](/documentation/AppKit/NSBitmapImageRep) object. The [`currentFrame`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/currentFrame), [`currentFrameDuration`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/currentFrameDuration), and [`frameCount`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/frameCount) properties of the bitmap image representation determine the timing and looping characteristics of the animation. For more information, see [`NSBitmapImageRep`](/documentation/AppKit/NSBitmapImageRep).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)