Make WordPress Core

Ticket #62094: wp-62094-2.patch

File wp-62094-2.patch, 694 bytes (added by colinleroy, 10 months ago)

Correct patch. The constrained 99999 height was messing the ratio calculation, preventing image_get_intermediate_size() to consider good candidates.

  • wp-includes/embed.php

    old new  
    721721        }
    722722
    723723        if ( $thumbnail_id ) {
    724                 list( $thumbnail_url, $thumbnail_width, $thumbnail_height ) = wp_get_attachment_image_src( $thumbnail_id, array( $width, 99999 ) );
     724                list( $thumbnail_url, $thumbnail_width, $thumbnail_height ) = wp_get_attachment_image_src( $thumbnail_id, array( $width, 0 ) );
    725725                $data['thumbnail_url']                                      = $thumbnail_url;
    726726                $data['thumbnail_width']                                    = $thumbnail_width;
    727727                $data['thumbnail_height']                                   = $thumbnail_height;