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

# Image::basePath

## Get fully qualified path



> public Intervention\Image\Image basePath()

Get the base path for the current image, if instance was initiated from an actual file.

### Parameters

none

### Return Values

Returns the absolute path of the image file as `string` or `null` if the image instance wasn't created from a file.

Examples

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

// get file path
$path = $img->basePath();
```

---

## 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)