Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Cloudinary

    (@cloudinary)

    Hi Dan,

    1. Currently uploading directly to WP’s media library will store the images on your WP storage, you’ll need to migrate the images afterwards to Cloudinary (can be done in bulks).
    2. You can do a HEAD request to make sure you’re getting a 200 response before using cloudinary_url.
    3. The images will still keep on rendering on your account. You’ll get an Email notifications when you’re about to reach the limits and after you’ve exceeded them, and we’ll kindly ask you to update your plan to one which will be more suitable to your requirements.

    Thread Starter p10design

    (@p10design)

    1. Thanks

    2. How do I do a HEAD request?

    3. Thanks

    Plugin Author Cloudinary

    (@cloudinary)

    You can do something like:

    $url = cloudinary_url("my_image.jpg");
    $context  = stream_context_create(array('http' =>array('method'=>'HEAD')));
    $fd = fopen($url, 'rb', false, $context);
    if (stream_get_meta_data($fd)["wrapper_data"][0] == "HTTP/1.0 200 OK"){
      #do stuff here
    }
    fclose($fd);
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Automatically upload and check if file exists’ is closed to new replies.