WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
Maximum Images per gallery (4 posts)

  1. agonyaunt
    Member
    Posted 2 years ago #

    Is there a recommened maximum of images per gallery?
    I have some catergories that have 18 000 images - will this create a problem when creating thumbnails?

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. AMediaCompany
    Member
    Posted 2 years ago #

    Not necessarily. I have a site with over 19,000 images in the gallery, which I'm importing from a custom system via a custom script (sorry, can't share it).

    the problem seems to be if you have a number at the end of the filename. this is where things become a problem (see last post here):

    e.g. filename3.jpg makes nextgen gallery have an error (white screen)
    filename3a.jpg is fine

    So, all my imports make sure that a the entry in the nextGen database has a non-numeric string at the end.

    In my case, I had all sorts of weird filenames and so did the following (please understand before copying as it's rough code; I'm not supporting it):

    <?php
    // yes, BMP was supported in my Old DB, and so must we
    preg_match('/(jpg|gif|png|bmp)$/i',$filename,$matches);
    
    // get the extension
    if(count($matches)>0){$ext = $matches[1];}
    
    $filename = md5($oldfilename).'string'.$file_extension;
    
    // now you can add to the database as you see fit
    ?>
  3. AMediaCompany
    Member
    Posted 2 years ago #

    Since I can't edit my post now, if you get a blank screen in NextGen gallery, you need to do the following check (assuming you inported all data, and nothing has been added via the admin):

    select COUNT(*),galleryid,filename FROM wp_ngg_pictures where filename like '%0.%' OR filename like '%1.%' OR filename like '%2.%' OR filename like '%3.%' OR filename like '%4.%' OR filename like '%5.%' OR filename like '%6.%' OR filename like '%7.%' OR filename like '%8.%' OR filename like '%9.%';

    If you don't get the following, that's likely your problem (had that happen to me today a couple times):

    +----------+-----------+----------+
    | COUNT(*) | galleryid | filename |
    +----------+-----------+----------+
    |        0 |      NULL | NULL     |
    +----------+-----------+----------+
  4. AMediaCompany
    Member
    Posted 2 years ago #

    Nope, I shot myself in the foot. the limit is somewhere around 12,000 images. my import was running fine until then. I've had to segment my data to less than that.

    Also, the more images in a gallery, the slower it becomes overall, even though not all are showing up on the main page, with only the default options turned on:
    Gallery Settings -> Add hidden images is turned OFF

    Not sure why this would be the case though.

    Hope that helps you

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.