Title: load_image_to_edit_path
Published: April 25, 2014
Last modified: February 24, 2026

---

# apply_filters( ‘load_image_to_edit_path’, string|false $filepath, int $attachment_id, string|int[] $size )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/load_image_to_edit_path/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/load_image_to_edit_path/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/load_image_to_edit_path/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/load_image_to_edit_path/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/load_image_to_edit_path/?output_format=md#wp--skip-link--target)

Filters the returned path or URL of the current image.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/load_image_to_edit_path/?output_format=md#parameters)󠁿

 `$filepath`string|false

File path or URL to current image, or false.

`$attachment_id`int

Attachment ID.

`$size`string|int[]

Requested image size. Can be any registered image size name, or an array of width
and height values in pixels (in that order).

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/load_image_to_edit_path/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'load_image_to_edit_path', $filepath, $attachment_id, $size );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/image.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/image.php#L1247)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/image.php#L1247-L1247)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/load_image_to_edit_path/?output_format=md#related)󠁿

| Used by | Description | 
| [_load_image_to_edit_path()](https://developer.wordpress.org/reference/functions/_load_image_to_edit_path/)`wp-admin/includes/image.php` |

Retrieves the path or URL of an attachment’s attached file.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/load_image_to_edit_path/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.9.0](https://developer.wordpress.org/reference/since/2.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fload_image_to_edit_path%2F)
before being able to contribute a note or feedback.