[wp-trac] [WordPress Trac] #48472: The "wp_generate_attachment_metadata" filter is not fired when the initial upload request fails but the upload was completed successfully by retrying to create image sub-sizes

WordPress Trac noreply at wordpress.org
Wed Oct 30 19:15:01 UTC 2019


#48472: The "wp_generate_attachment_metadata" filter is not fired when the initial
upload request fails but the upload was completed successfully by retrying
to create image sub-sizes
--------------------------+---------------------
 Reporter:  azaozz        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.3
Component:  Upload        |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------
Changes (by azaozz):

 * milestone:  Awaiting Review => 5.3


Comment:

 Moving to 5.3 for consideration.

 There was a discussion and several regression reports in
 [https://wordpress.slack.com/archives/C02SX62S6/p1571924433208800?thread_ts=1571923948.199900&cid=C02SX62S6
 #core-media on Slack].

 The consensus was that a hook needs to be fired after an image is uploaded
 successfully and all sub-sizes were created. Before #47872
 `wp_generate_attachment_metadata` was always fired in these cases. Firing
 it at the end of `wp_update_image_subsizes()` seems to make the most sense
 and is backwards compatible.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48472#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list