Ticket #16458: 16458.2.diff
File 16458.2.diff, 706 bytes (added by , 12 years ago) |
---|
-
wp-includes/media.php
455 455 return new WP_Error('resize_path_invalid', __( 'Resize path invalid' )); 456 456 } else { 457 457 // all other formats are converted to jpg 458 $destfilename = "{$dir}/{$name}-{$suffix}.jpg"; 458 if ( !in_array( $ext, array( 'jpg', 'jpeg' ) ) ) 459 $ext = 'jpg'; 460 $destfilename = "{$dir}/{$name}-{$suffix}.$ext"; 459 461 if ( !imagejpeg( $newimage, $destfilename, apply_filters( 'jpeg_quality', $jpeg_quality, 'image_resize' ) ) ) 460 462 return new WP_Error('resize_path_invalid', __( 'Resize path invalid' )); 461 463 }