---
title: "CGImageSourceCreateWithURL(_:_:)"
framework: imageio
role: symbol
role_heading: Function
path: "imageio/cgimagesourcecreatewithurl(_:_:)"
---

# CGImageSourceCreateWithURL(_:_:)

Creates an image source that reads from a location specified by a URL.

## Declaration

```swift
func CGImageSourceCreateWithURL(_ url: CFURL, _ options: CFDictionary?) -> CGImageSource?
```

## Parameters

- `url`: The URL of the image.
- `options`: A dictionary that specifies additional creation options. For a list of possible values, see doc://com.apple.imageio/documentation/ImageIO/CGImageSource#Specifying-the-Read-Options.

## Return Value

Return Value An image source. You’re responsible for releasing this type using CFRelease.

## See Also

### Creating an Image Source

- [CGImageSourceCreateWithData(_:_:)](imageio/cgimagesourcecreatewithdata(_:_:).md)
- [CGImageSourceCreateWithDataProvider(_:_:)](imageio/cgimagesourcecreatewithdataprovider(_:_:).md)
- [CGImageSourceCreateIncremental(_:)](imageio/cgimagesourcecreateincremental(_:).md)
