Do I read correctly you want to include the source of the image into the
`src` attribute?

To do that you need to encode the image data in base64 and set a predefined
header in front of it, something like explained here:
http://www.websiteoptimization.com/speed/tweak/inline-images/

So you src attribute would start with:

src="data:image/gif;base64,

followed by the base64 encoded image. You also specify the proper image
type in that header line.

Hope that helps,
Torsten.



Eveline van Hal <[email protected]> schrieb am Di., 5. Apr. 2016 um
14:19 Uhr:

> Hi everyone!
>
> I'm trying to load an image by doing a get request. I have to do a
> request, because I have to add headers for authorization.
>
> [:img {:src (ajax/GET (str "/api/1.0/image/" (:company/logo company)
> "?size=" 100) {:headers       jwt-authorization-header
>
>                    :format        :json
>
>                    :handler       handler
>
>                    :error-handler error-handler})}]
>
> I have found some possible solutions, which I'm trying (something with
> base64?) - but its not working yet... Maybe someone here has some
> experience with this?
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to