Forked canvasResize that deals only with data URLs, not file objects