SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,381
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Single Page Architecture: Is lazy loading images the solution to an image-laden site?

    I'm learning to use an SPA architecture call AngularJS. I'm concerned whether SPA is a good way to go if the site is heavy on images. Since it loads one page, won't it take a long time to load if it has to load a hundred 500px square images?

    Is lazy-loading the best way to address this problem? (When I get more proficient at AngularJS then I'll be able to test for myself.)

    Lazy-loading example for the uninformed:
    http://css-tricks.com/snippets/javas...oading-images/
    Steve Husting

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2005
    Posts
    1,849
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    On another board someone was wondering why their image gallery with thumbnails was taking so long to load. Turned out it was lazy loading 35 MB of full-sized images, most of which may never be viewed. Bad idea.

  3. #3
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,381
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Wink

    Quote Originally Posted by cheesedude View Post
    On another board someone was wondering why their image gallery with thumbnails was taking so long to load. Turned out it was lazy loading 35 MB of full-sized images, most of which may never be viewed. Bad idea.
    Mine is a page of 20 x 500px images. A slightly different use case!
    Steve Husting

  4. #4
    Community Advisor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,438
    Mentioned
    45 Post(s)
    Tagged
    13 Thread(s)
    Hey Steve,

    It depends on the structure of your site as to when the images will be loaded. If the page with your images is loaded as a template using ngView, then the browser won't start downloading the images until that template is inserted into the page.
    "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies."

  5. #5
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,381
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fretburner View Post
    Hey Steve,

    It depends on the structure of your site as to when the images will be loaded. If the page with your images is loaded as a template using ngView, then the browser won't start downloading the images until that template is inserted into the page.
    That answers my question! Thanks!
    Steve Husting


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •