Pregunta

Is there any simple way to embed image in URL in Django like this?

<img alt="Embedded Image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." />

I have to render many little pictures and I guess it would be faster.

No hay solución correcta

Otros consejos

It would be even faster to assemble all your little pictures into a single graphic then split it up into individually renderable sprites. See http://css-tricks.com/css-sprites/ for an introduction.

In all matters relating to programming, however, the same rule applies: first, make it work. Then (if it doesn't work fast enough) make it work faster. Why don't you start out using standard images and see what performance is like before you try to optimize something that may not need it?

If you do need to improve things, then at least you have a working codebase to start from.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top