WordPress.org

Make WordPress Core

Ticket #48214: 48214.patch

File 48214.patch, 1.3 KB (added by dkarfa, 16 months ago)
  • src/wp-admin/includes/image.php

     
    203203 */
    204204function wp_create_image_subsizes( $file, $attachment_id ) {
    205205        $imagesize = @getimagesize( $file );
     206        $max_image_size = 2560;
    206207
    207208        if ( empty( $imagesize ) ) {
    208209                // File is not an image.
     
    235236         *
    236237         * @since 5.3.0
    237238         *
    238          * @param array  $imagesize     Indexed array of the image width and height (in that order).
    239          * @param string $file          Full path to the uploaded image file.
    240          * @param int    $attachment_id Attachment post ID.
     239         * @patam int    $max_image_size Max image available size.
     240         * @param array  $imagesize      Indexed array of the image width and height (in that order).
     241         * @param string $file           Full path to the uploaded image file.
     242         * @param int    $attachment_id  Attachment post ID.
    241243         */
    242         $threshold = (int) apply_filters( 'big_image_size_threshold', 2560, $imagesize, $file, $attachment_id );
     244        $threshold = (int) apply_filters( 'big_image_size_threshold', $max_image_size, $imagesize, $file, $attachment_id );
    243245
    244246        // If the original image's dimensions are over the threshold, scale the image
    245247        // and use it as the "full" size.