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

# Image::flip

## Mirror the current image vertically or horizontally



> public Intervention\Image\Image flip([string $mode])

Mirror the current image horizontally or vertically by specifying the **mode**.

### Parameters

#### mode (optional)
Specify the mode the image will be flipped. You can set ```h``` for horizontal (default) or ```v``` for vertical flip.

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

### Examples

```php
// create Image from file
$img = Image::make('public/foo.jpg');

// flip image vertically
$img->flip('v');
```

### See also

- [rotate](https://image.intervention.io/v2/api/rotate.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)