---
application: "Intervention Image"
version: "Version 2"
status: "eol"
---

# Image::backup

## Save a backup of the current image state



> public Intervention\Image\Image backup([string $name])

Backups current image state as fallback for [reset method](https://image.intervention.io/v2/api/reset.md) under an optional **name**. Overwrites older state on every call, unless a different name is passed.

### Parameters

#### name (optional)
The name of the backup in memory. Default: *default*

### Return Values
Instance of `Intervention\Image\Image`

### Examples

```php
// create empty canvas with black background
$img = Image::canvas(120, 90, '#000000');

// fill image with color
$img->fill('#b53717');

// backup image with colored background
$img->backup();

// fill image with tiled image
$img->fill('tile.png');

// return to colored background
$img->reset();
```

### See also

- [reset](https://image.intervention.io/v2/api/reset.md)

---

## Become a Sponsor

### Intervention Image needs your help to keep the project going

Intervention Image is non-commercial, open source licensed and completely free to use. The considerable
effort required to maintain and develop the software is only possible with the financial support
of sponsors. There are two ways in which you can support this project.

- Support via [GitHub Sponsors](https://github.com/sponsors/Intervention)
- Support via [Ko-Fi](https://ko-fi.com/interventionphp)