gradio: gr.ImageEditor does not support source="webcam" for direct image capture

Describe the bug

gr.ImageEditor does not support sources="webcam", preventing direct image capture from a webcam. Although the webcam icon appears in the UI, clicking it does not activate the webcam or allow image capture.

Gradio Version: 5.13.2 Browser: Google Chrome

If gr.Image is used with sources="webcam", the webcam functions correctly, capturing images as expected. However, gr.ImageEditor does not seem to support this feature, requiring an additional step to transfer the image from gr.Image to gr.ImageEditor.

This limitation makes it less convenient for users who want to edit images directly after capturing them from a webcam. It would be beneficial if gr.ImageEditor could support source=“webcam” natively.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr

image_input = gr.ImageEditor(sources=['webcam'])

Screenshot

Image

Logs

None

System Info

Gradio Version: `5.13.2`

Severity

Blocking usage of gradio

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

And it is out!

Should have a full release later today! Glad it works for you!

Hi @freddyaboulton,

Thank you for confirming that this is a bug and that a fix is on the way! I appreciate your quick response. Could you please notify me when the issue has been resolved? I’d love to test it as soon as the fix is available.

Regarding webcam_constraints, I believe adding this parameter to gr.ImageEditor would be quite important. Many users may need to control the resolution of webcam-captured images, especially for performance reasons when handling large images in the editor. Since this option is available in gr.Image, having the same capability in gr.ImageEditor would make workflows more consistent and easier to manage.