Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can this be done in Pure JS solution within browser? Why need backend?


An API allows you to create images from things that are not browsers.


The product is an "API to generate images on the fly". How would you create an API with no backend?


Not the API, I meant this functionality of rendering text on image, can this be done in JS only?


One barrier is if you load an image from a source that doesn't allow CORS the canvas becomes "tainted" and exports are blocked (https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabl...)


Yes, HTML5 Canvas. ctx.drawImage() ctx.fillText()


Yes but then you can't post it to social media as easily. Unless you export it as an image from JavaScript.

This is good for social media managers that want to automate a lot of account posts.


Yes its way easier in browser on front-end.

But you need API for the things that happens off browser. Like if you want to create images inside your code.


Sure it can, and I'd say it's much cheaper to do it in JS than using API (with quite small quota, even for paid plans)


It can be done, but this is already done, so you can just pay with money instead of dev time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: