wp_get_original_image_url filter-hookWP 5.3.0

Filters the URL to the original attachment image.

Usage

add_filter( 'wp_get_original_image_url', 'wp_kama_get_original_image_url_filter', 10, 2 );

/**
 * Function for `wp_get_original_image_url` filter-hook.
 * 
 * @param string $original_image_url URL to original image.
 * @param int    $attachment_id      Attachment ID.
 *
 * @return string
 */
function wp_kama_get_original_image_url_filter( $original_image_url, $attachment_id ){

	// filter...
	return $original_image_url;
}
$original_image_url(string)
URL to original image.
$attachment_id(int)
Attachment ID.

Changelog

Since 5.3.0 Introduced.

Where the hook is called

wp_get_original_image_url()
wp_get_original_image_url
wp-includes/post.php 8056
return apply_filters( 'wp_get_original_image_url', $original_image_url, $attachment_id );

Where the hook is used in WordPress

Usage not found.