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

# Image::interlace

## Enable or disabled interlaced mode of the current image



> public Intervention\Image\Image interlace([boolean $interlace])

Determine whether an image should be encoded in interlaced or standard mode by toggling **interlace** mode with a boolean parameter. If an JPEG image is set interlaced the image will be processed as a progressive JPEG.

### Parameters

#### interlace (optional)
If interlace is set to boolean `true` the image will be encoded interlaced. If the parameter is set to `false` interlaced mode is turned off. Default: `true`


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

### Examples

```php
// open image
$img = Image::make('public/foo.png');

// enable interlacing
$img->interlace();

// save image interlaced
$img->save();

// open interlaced image
$img = Image::make('public/interlaced.gif');

// disable interlacing
$img->interlace(false);

// save image in standard mode
$img->save();
```

### See also

- [limitColors](https://image.intervention.io/v2/api/limit-colors.md)
- [save](https://image.intervention.io/v2/api/save.md)
- [encode](https://image.intervention.io/v2/api/encode.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)