Skip to content
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

Suggestion: allow base64 encoded images #3

Open
rgerard opened this issue Jul 20, 2012 · 1 comment
Open

Suggestion: allow base64 encoded images #3

rgerard opened this issue Jul 20, 2012 · 1 comment

Comments

@rgerard
Copy link

rgerard commented Jul 20, 2012

For the image object, it would be nice to allow small images to just send back their base64 encoding, as opposed to the URL. Something like this:

"16s": {
"height": 16,
"width": 16,
"base64": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1woICQIzztyOYgAAAHVJREFUeNpj/P//f3t7OwNuICwsnJaWBueyQKjExABcGjZtOhwWFrZq1SoUDRISmrjtOLxq1Sq4HiYGIkBYWBicZCGoOi0tzcjIiIGBoauriygNDAwMJiYmcDZRTkIGoxpoogEacWfPniVBw/nz58+fP0+kBgCxLR/Dk4eUOQAAAABJRU5ErkJggg=="
},

In a project I worked on a while back, we had to fetch tons of small images from urls. We instead started sending down the base64 encoding instead of the url, which saved us a round-trip in fetching the image. For a small image like this (16 x 16), the extra bandwidth to send the encoded text is negligible compared to the cost of opening another http request and pulling down the image.

@fields
Copy link

fields commented Jul 15, 2013

No, I didn't. I used the number 3 in a comment and it put in this reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants