Can I upload images from a webcam?

It is possible to upload webcam images from the browser to Cloudinary.

Take a look at the following sample HTML5 code for capturing a webcam image.

The data value in the takepicture function is a data-uri image representation that you can upload to Cloudinary either directly from the browser using the jQuery plugin or through your server.

For direct image uploads, see:

You should add an image input file to your HTML form. For example, in Rails add the following command to your view (the resource type parameter is required in this case).

<%= cl_image_upload_tag(:image_id, :resource_type => :image, :html => {:class => "image_upload" }) %>

The following Javascript commands can be added to the takepicture function for initiating upload to Cloudinary with the captured image:

$('.image_upload').fileupload('option', 'formData').file = data;
$('.image_upload').fileupload('add', { files: [ data ] });
Have more questions? Submit a request


  • Avatar
    Camilo da Silveira

    Saved my day!!!

    Very good.


Powered by Zendesk