WordPress.org

Make WordPress Core

Ticket #35390: 35390.2.patch

File 35390.2.patch, 689 bytes (added by joemcgill, 4 years ago)
  • src/wp-includes/media.php

    diff --git src/wp-includes/media.php src/wp-includes/media.php
    index 6b0187a..d78568d 100644
    function image_constrain_size_for_editor( $width, $height, $size = 'medium', $co 
    7979                 */
    8080                $max_width = intval(get_option('large_size_w'));
    8181                $max_height = intval(get_option('large_size_h'));
    82                 if ( intval($content_width) > 0 ) {
     82                if ( intval($content_width) > 0  && 'edit' === $context ) {
    8383                        $max_width = min( intval($content_width), $max_width );
    8484                }
    8585        } elseif ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) && in_array( $size, array_keys( $_wp_additional_image_sizes ) ) ) {