Le 07/09/2014 17:42, 'gazza' via pylons-discuss a écrit :
> Hello,
>  
> I would like to pass an image to a template dynamically to avoid any
> file writes. I convert the image to a StringIO and get the value. I
> wanted to pass that into a context object and simply display it like below:
>  
> <image src='$c.imageobject'/>

Shouldn't the "src" attribute receive an URL rather than the actual
content? Maybe this is what you need:

http://www.websiteoptimization.com/speed/tweak/inline-images/

more specifically:

data:[<mediatype>][;base64],<data>

Not sure if it's a good idea for larger images, though.

Hope this helps,

Laurent.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to