---
title: image()
framework: webkit
role: symbol
role_heading: Instance Method
path: webkit/domelement/image()
---

# image()

Returns an image associated with the receiver.

## Declaration

```swift
func image() -> NSImage!
```

## Discussion

Discussion Returns an NSImage for the receiver if it is a DOMHTMLImageElement object—a DOMHTMLObjectElement object with an image loaded or a DOMHTMLInputElement object of type image. Returns nil if there is an error loading the image or the element does not contain an image.
