mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-03 22:27:04 +00:00
Media: Add link to the original image in the image properties if it was scaled or rotated after uploading.
Fixes #49290. git-svn-id: https://develop.svn.wordpress.org/trunk@47202 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3560,6 +3560,11 @@ function wp_prepare_attachment_for_js( $attachment ) {
|
||||
}
|
||||
|
||||
if ( 'image' === $type ) {
|
||||
if ( ! empty( $meta['original_image'] ) ) {
|
||||
$response['originalImageURL'] = wp_get_original_image_url( $attachment->ID );
|
||||
$response['originalImageName'] = wp_basename( wp_get_original_image_path( $attachment->ID ) );
|
||||
}
|
||||
|
||||
$sizes['full'] = array( 'url' => $attachment_url );
|
||||
|
||||
if ( isset( $meta['height'], $meta['width'] ) ) {
|
||||
|
||||
Reference in New Issue
Block a user