The original code used 'image/jpeg' on line 1292 of form.js.  So this just maintains what was originally there.  If we do not specify a mime type to canvas.toBlob() we get PNG files.  For most user photos I think JPEG will compress better than PNG.