---
title: "init(url:width:height:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/inimage/init(url:width:height:)-41ikr"
---

# init(url:width:height:)

Creates an image object, of the specified size, from an image file in the local file system.

## Declaration

```swift
convenience init?(url URL: URL, width: Double, height: Double)
```

## Parameters

- `URL`: A URL to an image file on the local file system. The image can be in any format that the system supports.
- `width`: The required width, in points, of the image. If necessary, the system scales the image, horizontally, to match this value.
- `height`: The request height, in points, of the image. If necessary, the system scales the image, vertically, to match this value.

## Return Value

Return Value An image object that contains the local image file at the specified size, or nil if the system can’t load the image file or it doesn’t exist.

## See Also

### Creating an Image Object

- [init(named:)](intents/inimage/init(named:).md)
- [init(UIImage:)](intents/inimage/init(uiimage:).md)
- [init(CGImage:)](intents/inimage/init(cgimage:).md)
- [init(imageData:)](intents/inimage/init(imagedata:).md)
- [init(url:)](intents/inimage/init(url:)-8eo3q.md)
