Title: wp_get_original_image_path
Published: November 12, 2019
Last modified: May 20, 2026

---

# apply_filters( ‘wp_get_original_image_path’, string $original_image, int $attachment_id )

## In this article

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

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

Filters the path to the original image.

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

 `$original_image`string

Path to original image file.

`$attachment_id`int

Attachment ID.

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

    ```php
    return apply_filters( 'wp_get_original_image_path', $original_image, $attachment_id );
    ```

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

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

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

Retrieves the path to an uploaded image file.

  |

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

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

## User Contributed Notes

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