[wp-trac] [WordPress Trac] #54016: Media Library: Bulk delete elements in grid view takes very long

WordPress Trac noreply at wordpress.org
Wed Apr 1 12:14:38 UTC 2026


#54016: Media Library: Bulk delete elements in grid view takes very long
-------------------------+------------------------------
 Reporter:  Presskopp    |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Media        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  performance
-------------------------+------------------------------

Comment (by jdeep):

 I would like to spent some time looking for a good approach for this. I
 checked this and can argue that sending an ajax request for every image is
 not performant.

 A simple solution would be to gather the selected attachment IDs from the
 Backbone selection collection on the frontend and send them to a new bulk
 delete AJAX endpoint. To prevent server timeouts on large deletions, we
 could chunk the requests in reasonable sizes. This approach should reduce
 the network overhead. We can always optimise how the backend deletes the
 data (through cron jobs or immediate deletes).

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


More information about the wp-trac mailing list