/cart/add.js no longer supports image blobs in the cart properties

Hello

It seems recently shopify has either changed something here, or a bug…

Either way, customers who have to upload custom images to our site for us to print, is now useless as the image is not coming through. https://gyazo.com/c56c8c0c2e5c310ea6f6ca914fb93192 This is currently how it looks compared to it coming through as a picture before.

Any help, this is a big issue for my store.

Hi

Hope this will help

Convert uploaded images to Base64 strings and ensure they are correctly included in your AJAX requests to /cart/add.js

convert an image to Base64 using JavaScript example

function getBase64Image(img) {
    var canvas = document.createElement("canvas");
    canvas.width = img.width;
    canvas.height = img.height;
    var ctx = canvas.getContext("2d");
    ctx.drawImage(img, 0, 0);
    var dataURL = canvas.toDataURL("image/png");
    return dataURL;
}

Sadly that makes the cart field have 1000 letters for text in at checkout.

That isnt a viable option… It looks awful.

Just jumping into this thread to report the same issue.

We have been submitting image blobs to the cart via the API for some time now, and this ability seems to have been removed overnight and is now instead submitting an object, e.g.:

{"filename"=>"img.png", "type"=>"image/png", "name"=>"properties[Please upload image you would like us to use.]", "tempfile"=>"#

We have the same issue, but we don’t use API
We have been using HTML tag:


It worked correctly before
We had not changed anything

Sadly they dont seem to be aware of this, I have been to live chat and they said they have passed it on, but its still not working.

I’ve had a reasonably extensive chat with support today, and they have said that their developers are now actively looking into it and plan to implement a fix. Hopefully, this should be resolved soon.

Just had a follow up email from support, and it looks like this should now be resolved.