Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3232776
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:12:02+00:00 2026-05-17T17:12:02+00:00

Hi I’m having a problem with creating a dynamic gallery with php and jQuery.

  • 0

Hi
I’m having a problem with creating a dynamic gallery with php and jQuery.
In simple words, I have got a hundred pictures I want displayed in a nice form (for a photographer’s website). Pictures have been optimized, so the whole gallery weights about 10mb.

I am using the galleryView plugin. php is used to take all filenames from the images’ folder and create an unordered list of s.
GalleryView then gets the list and creates a neat gallery.

The problem I’ve got is that you have to wait for the gallery to show until all the pictures are downloaded. with 10mbs, it takes ages.

Is there a simple option of running the gallery after only a few files are downloaded?

Or does anyone maybe know a better way of doing it? some nice jQuery gallery plugin that can handle many images? I’ve been quite unsuccessful searching for one.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:12:02+00:00Added an answer on May 17, 2026 at 5:12 pm

    There doesn’t appear to be any native support of preloading images in galleryView. From the specs:

    I’ll look into pre-loading images in future version

    So you have to roll your own.

    Take a look at the jQuery .load() function.

    Show the first image once it’s loaded, then load the others in the background.

    Let’s say the first image is in id = first

    $(function() { // <== doc ready
    
          // do something after first image is loaded
        $("#first").load( /* show the first image */ );
    
          // do something after all images loaded
        $("img").load( /* do the main gallery loop */ )
    });
    

    Modify the above as needed. Let’s say if you want to show the first big image and first 5 thumbnails, etc.


    Here’s how I’d start. I think it’d probably look smoother if you preloaded not just the 1st image, but as many images as it takes to fill up the first row of thumbs.

    Show a temporary div with just one image until all the images load:

    HTML:

    <div id="temp"></div>
    <div id="photos" class="galleryview">
        <img id="first" ... />
        <img ... />
        <img ... />
        <img ... />
        ...
    </div>
    

    JS:

    $(function() { // <== doc ready
    
        var $photos = $("#photos"), $temp = $("#temp"),
            $first = $("#first");
    
          // Hide gallery:
        $photos.hide();      
    
          // show temp when 1st img loaded
        $first.load( $temp.append( $first.clone() ) );
    
          // To make things look smooth you can also make 
          // a quick gallery view out of temp. This only has 1 image.
        $temp.galleryView({
            panel_width: 800,
            panel_height: 300,
            frame_width: 100,
            frame_height: 100,
        });
    
          // do full gallery when all imgs loaded
        $("img").load( 
              // remove the temp gallery
            $temp.remove();
              // show gallery
            $photos.galleryView({
                panel_width: 800,
                panel_height: 300,
                frame_width: 100,
                frame_height: 100,
            });
        );
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.