[wp-trac] [WordPress Trac] #64804: REST API: Add finalize endpoint to `WP_REST_Attachments_Controller` for client-side media processing

WordPress Trac noreply at wordpress.org
Thu Mar 12 06:02:11 UTC 2026


#64804: REST API: Add finalize endpoint to `WP_REST_Attachments_Controller` for
client-side media processing
---------------------------------------------+-----------------------------
 Reporter:  adamsilverstein                  |       Owner:
                                             |  adamsilverstein
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  7.0
Component:  REST API                         |     Version:  trunk
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+-----------------------------
Changes (by adamsilverstein):

 * owner:  (none) => adamsilverstein
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61982" 61982]:
 {{{
 #!CommitTicketReference repository="" revision="61982"
 REST API: Add finalize endpoint to `WP_REST_Attachments_Controller`.

 Introduce a `POST /wp/v2/media/{id}/finalize` REST API endpoint that re-
 triggers the `wp_generate_attachment_metadata` filter with context
 `'update'` after client-side media processing completes. This ensures
 server-side plugins (watermarking, CDN sync, custom sizes, etc.) can post-
 process attachments when client-side processing is active.

 The endpoint reuses `edit_media_item_permissions_check` for authorization
 and is only registered when `wp_is_client_side_media_processing_enabled()`
 returns true.

 See https://github.com/WordPress/gutenberg/pull/74913.
 See https://github.com/WordPress/gutenberg/issues/74358.

 Props adamsilverstein, westonruter, mukesh27, divyeshpatel01.
 Fixes #64804.
 }}}

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


More information about the wp-trac mailing list