Delayed client side image rendering

2

I use images on a web page that are loaded from a field of type blob in Firebird . Images open in a modal, fully loaded, that is, without using thumbnails , and when the user clicks on one of these images, the image is resized to a larger size and occupies the entire screen. p>

However, this process to open the image is taking a while, although the .png or other image format file is already loaded on the client side. I use no php base64_encode, and this returns a huge text to be rendered on the img element on the client side, I believe that's it, but I found no other way than to display to the user the image is loading .

Screen:

    
asked by anonymous 25.06.2015 / 19:04

1 answer

1

In the Controller of your application you can create a method to get the image from the database and call in src of your image in this way, for example, localhost/meuprojeto/controller/metodo?imagem={id_imagem} , so it does not take long to render and not there is a risk of crashing the user's browser.

    
15.09.2015 / 21:03