Make WordPress Core


Ignore:
Timestamp:
12/05/2024 09:19:37 PM (7 months ago)
Author:
swissspidy
Message:

Embeds: ensure correct thumbnail height.

Use height 0 instead of 9999 to avoid unnecessarily using the full size version.

Props colinleroy, swissspidy.
Fixes #62094.

File:
1 edited

Legend:

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

    r58286 r59493  
    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;
Note: See TracChangeset for help on using the changeset viewer.