[wp-trac] [WordPress Trac] #58647: wp_generate_attachment_metadata generates scaled images

WordPress Trac noreply at wordpress.org
Tue Jun 27 21:34:17 UTC 2023


#58647: wp_generate_attachment_metadata generates scaled images
--------------------------+-----------------------------
 Reporter:  picard102     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  6.2.2
 Severity:  major         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 When using wp_generate_attachment_metadata() it seems to ignore the filter
 to turn off "big_image_size_threshold".

 add_filter( 'big_image_size_threshold', '__return_false' );

 $generateThumbs = wp_generate_attachment_metadata( $attachmentId, $file );

 This results in a scaled version of the media being created and
 _wp_attached_file meta being replaced with the scaled versions path.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58647>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list