Make WordPress Core


Ignore:
Timestamp:
02/07/2020 05:11:45 AM (4 years ago)
Author:
azaozz
Message:

Media: Add link to the original image in the image properties if it was scaled or rotated after uploading.

Fixes #49290.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r47122 r47202  
    35613561
    35623562        if ( 'image' === $type ) {
     3563            if ( ! empty( $meta['original_image'] ) ) {
     3564                $response['originalImageURL']  = wp_get_original_image_url( $attachment->ID );
     3565                $response['originalImageName'] = wp_basename( wp_get_original_image_path( $attachment->ID ) );
     3566            }
     3567
    35633568            $sizes['full'] = array( 'url' => $attachment_url );
    35643569
Note: See TracChangeset for help on using the changeset viewer.