You can resize an image in base64 format using javascript by converting it to an image element, drawing it onto a canvas, resizing the canvas, and then converting the canvas back to a base64 string. Here is the code to achieve this:
index.tsx784 chars25 lines
You can call the resize function like this:
index.tsx241 chars8 lines
This function returns a promise that resolves with the resized base64 string.
gistlibby LogSnag