Fix webcam file to take picture and replace image and canvas