diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
index c93c3dbabf..71bc4e4ff6 100644
--- a/src/wp-includes/media.php
+++ b/src/wp-includes/media.php
@@ -946,6 +946,40 @@ function wp_get_attachment_image_url( $attachment_id, $size = 'thumbnail', $icon
 	return isset( $image['0'] ) ? $image['0'] : false;
 }
 
+/**
+ * Get the path of an image attachment.
+ *
+ * @since X.X.X
+ *
+ * @param int 				 $attachment_id Image attachment ID.
+ * @param string|array $size 					Optional. Image size to retrieve. Accepts any valid image size, or an array
+ *                                    of width and height values in pixels (in that order). Default 'thumbnail'.
+ * @return string|false Attachment path or false if no image is available.
+ */
+function wp_get_attachment_image_file( $attachment_id, $size = 'thumbnail' ) {
+
+	// get the file array
+	$file = wp_get_attachment_metadata( attachment_id );
+
+	if ( $file ) {
+
+		// get file name
+		$file_name = isset ( $file[ 'sizes' ][ $size ][ 'file' ] ) ? $file[ 'sizes' ][ $size ][ 'file' ] : false;
+
+		// get file path
+		$file_path = _wp_get_attachment_relative_path( $file_name );
+
+		// return path
+		if ( ! empty( $file_path) ) {
+
+			$path = ABSPATH . '/wp-content/uploads/' . trailingslashit( $file_path ) . $file_name;
+			return $path;
+		}
+	}
+
+	return false;
+}
+
 /**
  * Get the attachment path relative to the upload directory.
  *
