# `GSLayer addBackgroundImageWithURL:`

*Instance Method*

Adds an image from a file URL.

## Declaration

```swift
func addBackgroundImage(with URL: URL)
```

```objc
- (void) addBackgroundImageWithURL:(NSURL *) URL;
```

```python
addBackgroundImageWithURL_(URL: NSURL)
```

## Parameters

- `URL` — The image file URL.

## Discussion

The image becomes the layer’s background image. On a full-color layer, it is added as a shape instead.

## See Also

### Background Image

- [`GSBackgroundImage`](/Core/GlyphsCore/GSBackgroundImage) — A reference image attached directly to a layer.
- [`GSLayer.backgroundImage`](/Core/GlyphsCore/GSLayer/backgroundImage) — A reference image attached directly to the layer.
- [`GSLayer.hasBackgroundImage`](/Core/GlyphsCore/GSLayer/hasBackgroundImage) — Whether a background image is attached directly to the layer.

