Container fields in a web viewer best practice

Discussion created by DavidZakary on Sep 23, 2014
Latest reply on Dec 29, 2016 by ryan.thompson

Looking to see if anyone has come up with a best-practice for putting container field-based images into a web viewer.


Background... this database will likely be local computer-based only. No Server is going to be involved. The system is storing images which are eventually displayed in a web viewer. I'm working with about 20 images at the moment for development. The container data is stored externally. Each container image is anywhere from 200 kb to 1.8 mb.


The system for displaying the images is a jquery lightbox. Lots of CSS involved. The HTML image block is built dynamically, based on searching and sorting. It is then inserted into the wrapper HTML, Javascript and CSS code.


For the images being inserted into the code, I've tried two methods.


First method - hard coding. Don't like that method as it'd be too easy to break.


Second method - when an image is imported I store the base64 string. In the web viewer I use "data:image/jpg;base64," in the img src tag to decode the base64 string. This works relatively well and I think will be less fragile.


The probelm with the second method is speed. When I generate the HTML for the 20 images it takes around 1.7 seconds. That's OK. However the rendering in the webviewer takes about 8-10 seconds. As more images get added to the database its only going to get worse.


Wondering what others are doing and if you've come up with a system you're happy with.


Dave Zakary