Title: Bulk Remove functionality not working correctly
Last modified: June 7, 2024

---

# Bulk Remove functionality not working correctly

 *  [benzend](https://wordpress.org/support/users/benzend/)
 * (@benzend)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/bulk-remove-functionality-not-working-correctly/)
 * The bulk remove isn’t removing my images from cloudflare.
 * Here’s what I did:
    - Bulk offloaded images successfully into cloudflare
    - Needed to restart and instead keep the media structure with the offloaded 
      image urls. So I followed the instructions to try to bulk remove.
    - When I tried to bulk remove, a couple of images removed correctly, but it 
      stopped removing them.
    - Turned on the logs- looked like it had to do something with how it’s trying
      to pull the IDs from cloudflare. Maybe the IDs were stored incorrectly.
    - I don’t remember if the images were being removed if I went to the media library
      and hit the remove from cloudflare button, but it at least updated the image
      to say that it was removed from cloudflare.
    - I went through and manually dumped all of the images on cloudflare’s side.
    - Had to deactivate this plugin, since now the image urls are pointing to non
      existing images in cloudflare.
 * I think that my next steps are to:
    - Create a script that will go through the other 1000+ media to remove the “
      offloaded” boolean (I’m guessing that this is how this is being displayed)
    - Forget about the script and run through each image manually to turn off the“
      offloaded” boolean
 * Wondering if there’s an easy way to do this without having to build out the script
   myself. Is there an offloading “dump” that just resets each media’s “offloaded”
   property?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [benzend](https://wordpress.org/support/users/benzend/)
 * (@benzend)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/bulk-remove-functionality-not-working-correctly/#post-17840312)
 * Here’s some extra logs when running bulk remove, might help:
 *     ```wp-block-code
       [2024-05-31T16:44:01+00:00] Missing Cloudflare Image ID or hash. Attachment ID: 253. Image: Array(    [0] => https://foo.bar/wp-content/uploads/2021/05/foo_icon_clear.png)[2024-05-31T16:44:01+00:00] Missing Cloudflare Image ID or hash. Attachment ID: 253. Image: Array(    [0] => https://foo.bar/wp-content/uploads/2021/05/foo_icon_clear.png    [1] => 224    [2] => 225    [3] => )[2024-05-31T16:44:01+00:00] Missing Cloudflare Image ID or hash. Attachment ID: 253. Image: Array(    [0] => https://foo.bar/wp-content/uploads/2021/05/foo_icon_clear.png)[2024-05-31T16:44:01+00:00] Missing Cloudflare Image ID or hash. Attachment ID: 253. Image: Array(    [0] => https://foo.bar/wp-content/uploads/2021/05/foo_icon_clear.png    [1] => 224    [2] => 225    [3] => )
       ```
   
 *  Thread Starter [benzend](https://wordpress.org/support/users/benzend/)
 * (@benzend)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/bulk-remove-functionality-not-working-correctly/#post-17840343)
 * Also, here’s something that might help someone else out if they’re experiencing
   this:
    - Go to your media library
    - At the top of the page where it says “screen options”, set your load limit
      to something like 100 (I’m doing 500 at the moment)
    -  Make sure your plugin is activated, or you won’t see your offloaded status,
      making the following steps useless
    - Open your inspector’s console and run this script:
 *     ```wp-block-code
       let items = document.querySelectorAll('.cf-images-undo');let timeBetweenClick = 1000;function clickSlowly(arr) {    for (let i = 0; i < arr.length; i++) {        setTimeout(() => {            arr[i].click();        }, timeBetweenClick * i)    } }clickSlowly(items);
       ```
   
 * This should run through each image and attempt to set offloaded to false, or 
   rather, remove the image from CF in case the bulk removing doesn’t work
    -  This reply was modified 1 year, 11 months ago by [benzend](https://wordpress.org/support/users/benzend/).
 *  Plugin Author [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * (@vanyukov)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/bulk-remove-functionality-not-working-correctly/#post-17847856)
 * It looks like bulk remove got stuck on image 253. When this happens, the easiest
   would be to try and fix that image via the media library, because processing 
   individual images will actual print the error message for that image.
 * Best regards,
   Anton

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Bulk Remove functionality not working correctly’ is closed to new replies.

 * ![](https://ps.w.org/cf-images/assets/icon-256x256.png?rev=2930278)
 * [Offload, AI & Optimize with Cloudflare Images](https://wordpress.org/plugins/cf-images/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf-images/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf-images/)
 * [Active Topics](https://wordpress.org/support/plugin/cf-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf-images/reviews/)

## Tags

 * [bulk remove](https://wordpress.org/support/topic-tag/bulk-remove/)

 * 3 replies
 * 2 participants
 * Last reply from: [Anton Vanyukov](https://wordpress.org/support/users/vanyukov/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/bulk-remove-functionality-not-working-correctly/#post-17847856)
 * Status: not resolved