WordPress.org

Make WordPress Core

#23392 closed enhancement (fixed)

Sooner filtering for image_downsize()

Reported by: anatolbroder Owned by: SergeyBiryukov
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch commit
Focuses: Cc:

Description

In the function image_downsize() we have an initialization block with two non trivial time-consuming procedures inside.

	$img_url = wp_get_attachment_url($id);
	$meta = wp_get_attachment_metadata($id);

The filter image_downsize is below the block. But the filter parameters don’t interact with the initialization block. If we move the filter before the initialization block, plugins using the filter will save time.

Attachments (1)

23392.patch (910 bytes) - added by anatolbroder 15 months ago.

Download all attachments as: .zip

Change History (3)

anatolbroder15 months ago

comment:1 SergeyBiryukov15 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.6

Introduced in [6952] along with the function itself.

comment:2 SergeyBiryukov14 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 23410:

Return from image_downsize() earlier if a custom resize function is used. props anatolbroder. fixes #23392.

Note: See TracTickets for help on using tickets.