This may not be a direct answer to your question, but there is a way to generate images directly in the browser that you might find useful.
I’ve built a browser-based tool, which you can check out here: https://resize-with-blur.mytory.net/
It runs directly in the browser without any installation.
Looking into the app.js
code might also give you some helpful insights.
Thanks.