• I’ve got a website with over 5000 images that I would like to bulk upload to Cloudflare. I have the paid Cloudflare images account and I’ve got an API token.

    When I add the Account ID, then API, I’m taking to the settings screen where I’m able to start the process, but nothing gets delivered to Cloudflare.

    I also downloaded your beta version since I saw you made some fixes, but the logs don’t record. It seems to time out. I’ve tried creating a new API in case i had it wrong but it might be a conflict with an existing plugin.

    I also have Imagify premium. I’m afraid to turn that off since I need it to keep the image sizes small.

    Can you help me figure out what I can’t get bulk upload to work?

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter helloeddy

    (@helloeddy)

    I was in the process of running the bulk offload with over 5000 images.
    It was showing “Processing xxx of 5000” photos for about 4 hours until i timed out. In dev tools console, There was a 504: Gateway time-out error.

    Any idea how i can work with this plugin to get my many photos uploaded?

    Thread Starter helloeddy

    (@helloeddy)

    I also noticed in another thread you mentioned this:

    “That worked. I don’t see any blockers on your site, the images should be offloading. Could you please check if the following options are present in the?wp_options?table:?cf-images-config-written?and?cf-images-setup-done. Both should be present and set to?1?or?true.”

    I checked my wp options table and I noticed I did not have the row for cf-images-setup-done

    I am not an expert with phpmyadmin,so can you guide me on how to fix this?

    Plugin Author Anton Vanyukov

    (@vanyukov)

    Hi @helloeddy,

    The cf-images-setup-done option is added after the plugin successfully enables flexible variants on Cloudflare. If this is not happening, most likely there’s something with the API connection.

    I have improved logging and added a compatibility option to store the credentials in the database, instead of the wp-config.php file. So what I would do:

    1. Enable logging in the plugin
    2. Download the latest beta from here: https://github.com/av3nger/cf-images/releases/tag/1.6.0-beta.3
    3. Add the downloaded plugin via the Plugins menu in wp-admin and replace the current plugin
    4. Go to Media – Offload Settings, click the “Disconnect from API” link at the bottom of the page
    5. Enter your credentials and toggle the switch to store the credentials in the database
    6. Re-test

    Don’t forget to disable logging after you are done.

    Thread Starter helloeddy

    (@helloeddy)

    Ok now I’m able to see the images arrive to Cloudflare.

    But I see this error in the logs which seem to cause the process to stop:

    [2023-11-12T03:05:19+00:00] Cannot run get_attachment_image_src(), returning original. Attachment ID: . Image: [2023-11-12T03:05:19+00:00] Missing Cloudflare Image ID or hash. Attachment ID: 36845. Image: Array ( [0] => https://whitetigerqigong.com/wp-content/uploads/2021/01/WTQ_favico_new.png [1] => 412 [2] => 412 [3] => )

    [2023-11-12T03:05:20+00:00] Missing Cloudflare Image ID or hash. Attachment ID: 35158. Image: Array ( [0] => https://whitetigerqigong.com/wp-content/uploads/2021/04/preg-yoga-op.jpg [1] => 1200 [2] => 800 [3] => )

    [2023-11-12T03:05:20+00:00] Missing Cloudflare Image ID or hash. Attachment ID: 35158. Image: Array

    Any ideas? Thanks so much!

    Plugin Author Anton Vanyukov

    (@vanyukov)

    Right. Now we’re getting somewhere. Take any image from the above, for example, preg-yoga-op.jpg, find it in the media library and see if it is offloaded. If it is offloaded, then log in to your Cloudflare account, go to Images – Variants and check if the “Flexible variants” options is set.

    Best regards,
    Anton

    Thread Starter helloeddy

    (@helloeddy)

    Ok, i went to that image (preg-yoga-op.jpg) and found it was NOT offloaded, so I clicked to offload it to cloudflare. It did so.

    I then went to Cloudfare and I see it there.

    So I guess it just occassionally gets hung up but not sure why.

    Another concern of mine is every time i move away from the page, i have to start all over.

    With over 5000 images, it takes forever and the last time I was able to get up to 4000 something after 3 hours before it just got stuck. Then i had to refresh the page and start all over.

    I believe it was some kind of timeout message from either Cloudflare or my site.

    Is there anyway to assure this tool goes through all my images without having me leave the page open or making sure that it starts where it last left off when I have to restart?

    Thanks so much!

    Plugin Author Anton Vanyukov

    (@vanyukov)

    Yeah, I’m not sure if this is related to the latest issue that Cloudflare had recently, but I did get some reports that offloads were timing out. The 1.6.0 update significantly increased the timeout value (it’s at 15 seconds now vs 5 seconds before). Hopefully, this should fix the problem.

    The bulk process will resume where it left off. So if you’ve offloaded 4000 images, the plugin won’t offload them again, it will just offload the remaining 1000.

    You can use WP CLI, if that is easier – wp cf-images offload

    Best regards,
    Anton

    Thread Starter helloeddy

    (@helloeddy)

    I’m continuing to get this message for what seems like every file:
    2023-11-12T03:09:41+00:00] Missing Cloudflare Image ID or hash. Attachment ID: 82427. Image: Array

    Is this safe to ignore or does it mean there’s a problem?

    I went to Cloudflare Images > Varients and toggle switch was ON for “Flexible variants”?

    It also got hung up again, so now the bulk offloader will start from 0 to 5000.

    How can I be sure there won’t be any issues when accesses the images on my website?

    Thread Starter helloeddy

    (@helloeddy)

    I also receive this error now so I’m having to reset the bulk offload every hour.

    [2023-11-13T02:34:40+00:00] Cannot run get_attachment_image_src(), returning original. Attachment ID: . Image: [2023-11-13T02:35:17+00:00] Cannot run get_attachment_image_src(), returning original. Attachment ID: . Image: [2023-11-13T02:35:38+00:00] Cannot run get_attachment_image_src(), returning original. Attachment ID: . Image: [2023-11-13T02:35:46+00:00] Cannot run get_attachment_image_src(), returning original. Attachment ID: . Image: [2023-11-13T02:35:47+00:00] Missing Cloudflare Image ID or hash. Attachment ID: 13863. Image: Array ( [0] => https://whitetigerqigong.com/wp-content/uploads/2017/09/nguyen-thanh-van.jpg [1] => 210 [2] => 210 [3] =>

    Plugin Author Anton Vanyukov

    (@vanyukov)

    @helloeddy,

    Please ignore the logs, unless you’re debugging something very specific. The plugin utilizes default WordPress hooks, which get called a lot by themes and plugins. So there will be a lot of unrelated content. It does not indicate issues with your website.

    It also got hung up again, so now the bulk offloader will start from 0 to 5000.

    If the bulk offload process is starting from zero, then it means that images are not being offloaded. However, I can see that your site is serving all the images from Cloudflare.

    Best regards,
    Anton

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Bulk Offload Doesn’t work’ is closed to new replies.