title: Loading images dynamically slow, jquery, php
body: <p>I am developing a website that has some photos to display, divided in albums.
  Each photo's path is stored in a database. </p>
  
  <p>I want to display the photos using a jquery gallery plugin. The problem is that the photos are taking forever to load, which sometimes causes the browser to crash.</p>
  
  <p>I have tried lazy loading with galleria, lazyload and jpreloader, but so far the problem remains.</p>
  
  <p>For the development of the site i use CodeIgniter. So far i have tried two methods for loading the photos.
  1) By passing them from the controller to the view.<br>
  2) By using jquery and ajax.</p>
  
  <p>Which method is better from a performance perspective?</p>
  
  <p>The number of the photos isn't really big, just 17 with total size about 5mb.  </p>
  
  <p>If anyone could help me, i would be extremely gratefull.</p>