-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send images on the fly #8
Comments
Base 64 would work for images, but it sometimes causes problems with larger ones. |
Yes, you can do this. You'll need to store them in memory as a buffer instead of saving them to disk. However, you'll still need to serve them to the browser regardless of how they are stored. Your options are to base 64 encode them as a data URL, or you can render them directly to the data stream, referenced by a unique id. ex:
then your server does something like
|
Doing a bit of necromancy here. |
How does it fail? What error does it give? |
Well, the output seems to be an order of magnitude larger than what I expect What I'm trying to do is:
|
First of all awesome work on the 100% PURE image processing library. Hats off to that. I have a usecase where I need to generate images containing text and they cant be stored as there are gonna be 100/1000s of them. Is there a way I can generate an image and send it to the client as a url that the client can view. Basically talking about creating an image on the fly
EDIT 1
It seems a base 64 url would do the job. Can I convert a generated image to a base 64 url
Thank you for your help in advance
The text was updated successfully, but these errors were encountered: