What is the correct way to consume BLOBs via JAVASCRIPTS, HTML5, etc?

2

I'm using Google App Engine's BLOBSTORE. I already have some images saved on the server now I would like to consume them via browser (HTML5, JAVASCRIPT etc ...) It turns out that I have only the link that apparently is not of the image itself, as follows:

link

Note that there is no extension in the URL ...

What is the correct way to consume these blobs in the browser? Can I simply use this URL in the IMG SRC parameter?

    
asked by anonymous 01.07.2016 / 04:19

1 answer

1

Yes you can use with the HTML5 img tag, follow the example:

<div>
  <img src="https://filiperebollo1986.appspot.com/serve?blob-key=AMIfv967H0sWgJttreCFsuGZ57JmaXCkhFPC4QoHcPPxLBN2JhGkOGsY34rdD4ebvqNtdYfTmf_utULqUjdP_9mkjJQ91jkwkcDMlxlU7PZwrC-r0W-eIa3r8YaTWPKd7hAzuTcftyiUg8Ho2k9g1k4JV4Yx2MzdTwe_HeCHKGCvxnH3sm_WWN0"/></div>

Butwhenitcomestogoodpractice,therearesomeconsiderations:Therearesomegoodpracticestofollowwhenitcomestoservingimagesontheweb,mostareoptimizingtheimageitselftodecreaseitsweight,andthusdecreasingitssizewhichwouldresultinashortertimefortheusertoseethesameinhissite,thereisagoogleguidetopt-brtoteachonthesubject,I'llbeleavingthelinkattheendoftheanswer,besidesitisalwaysindicatedtheuseofaCDNservicetoservetheimagesandalsousestrategiesofcache.

Optimizationguidelink: link

    
01.07.2016 / 04:25