Make WordPress Core

Opened 3 years ago

Closed 2 months ago

#58647 closed defect (bug) (invalid)

wp_generate_attachment_metadata generates scaled images

Reported by: picard102 Owned by:
Priority: normal Milestone: Awaiting Review
Component: Media Version: 6.2.2
Severity: major Keywords: close
Cc: Focuses:

Description

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.

Change History (1)

#1 @nickchomey
2 months ago

  • Keywords close added
  • Resolutioninvalid
  • Status newclosed

'return_false' is not a function. you need to use '__return_false', or just false.

If it is still scaling, it is because something has forced conversion.

Closing this issue

Note: See TracTickets for help on using tickets.