<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIImage/init(contentsOf:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIImage(im)initWithContentsOfURL:options:"
  },
  "title" : "init(contentsOf:options:)"
}
-->

# init(contentsOf:options:)

Initializes an image object by reading an image from a URL, using the specified options.

```
init?(contentsOf url: URL, options: [CIImageOption : Any]? = nil)
```

## Parameters

`url`

The location of the image file to read.

`options`

A dictionary specifying image options. (See `Image Dictionary Keys`.)

## Return Value

The initialized image object, or `nil` if the object could not be initialized.

## See Also

[`imageWithContentsOfURL:options:`](/documentation/CoreImage/CIImage/imageWithContentsOfURL:options:)

Creates and returns an image object from the contents of a file, using the specified options.



---

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)