is there any way to "pre-build" thumbnail and slideshow images, without at least browse and use slideshow first time?
most of users said that G2 is slow, but i just think the major bottle neck is the image has been cached or not.
i know that when upload photos via G2 web interface, there is a option to create thumbnail after upload, but there is no such option in java applet and gallery remote also.
i have ton of images had been upload to G2 via gallery remote, but most of albums and images i have not browse and view 1 time yet, it is very tire to do this when i have ton of images.
furthermore, most of my albums have lot of images (300+) and have not view 1 time yet, when and i slideshow them, G2 initiate to prepare slideshow images and my users do not want to view my photos anymore.
G2 is still under development, but i just think G2 is stable enough to be "beta" more than "alpha", if we have a way to make G2 is pre-build thumbnail and slideshow images, G2 "alpha" will be more usable.
thx in advance.
----
Gallery URL (optional): gallery.ecinfo.org
Gallery version: latest build 2005.1.25
Webserver (with version): apache2
Datatabase (with version): mysql 4.1.8
PHP version (eg 4.2.1): 4.3.10
phpinfo URL (optional):
Graphics Toolkit(s): GD2
Operating system: win2003
Web browser/version: IE6 and FF
Posts: 8601
Here is a script that I use for this... rename to BuildAllDerivatives.php and place it in your gallery2/lib/tools directory, then access it in your browser.
Posts: 34
thx very much mindless, i have tried your script it works what i expect.
furthermore, for the future, is there any chance to develop this script to be a module, to let users to pre-build cache after upload new photos? or it should be included in core?
thx again for your nice script.
Posts: 6
I tried to run the build derivatives script. It runs to the point of me entering my setup password, and then I get a 404 error. Any clues?
Posts: 8601
dgwyn, can you see the url is wrong in some way? security.inc should redirect back to BuildAllDerivatives.php (with the correct path) after you enter the password.
security.inc was last updated jan 24 so you might upgrade the current cvs or nightly snapshot.
Posts: 6
Thanks - I decided to download a nightly snapshot and upgrade before I posted any more issues. I assume that might help alot!
Posts: 63
The script works well for me, but the counter is now at 2600... I only have 2000 Images in the gallery... :? HE stopped at 4700. Does it counts all Sizes for 1 Picture? So, i have 4 sizes normally for each picture.
Posts: 8601
BuildAllDerivatives... image thumbnails, resizes, or scale/rotate with save-original and album highlights are all derivatives. Watermarks too.
Posts: 5
yeah, that is what i was looking for. This script works very very fine, now it's not that slow anymore. One question: clears the cache himself automaticaly? i ask that because i don't want that, if a item doesn't change, id like to keep it's resized versions there in the cache ... or is the cache persitent (i hope that)...
Greetings,
thevagabond
Posts: 8601
the derivative files are deleted only when something about the item changes (you change the thumbnail/resize size or rotate/scale the source image, etc..)
Posts: 51
I was able to run this script on my previous install, but on this fresh load I am prompted for my password then I am given a blank browser page as the result. I've tried re-downloading the file to be sure but all seems good. Is this loggable in debug mode?
Chris Green
Posts: 12
Trying to find this script.. was the original post edited and script removed? I don't see the download for it anywhere.
--falz
Posts: 34
falz,
yes the script is still right here, plz right click and save as ...
and rename the extension name to .php
Posts: 12
Weird! I see it now (html table in your message where you speak of the script). This table wasn't there before. Perhaps it has to do with being logged in or something. Got it, seems to be working (churning away as I type)
Thanks
--falz
Posts: 15
Thanks mindless for this script. It works great and really speed up my gallery accesss time quite a lot.
I don't know why although I specify create thumbnails and all resized images upon upload, but many times when the images are accessed, I can still find the server is running several processes to make the thumbnails (by running ps under Linux). It seems like that either the resized images were not really made, or the cache were not kept for long time (e.g., only less than 24 hrs?). After running this scripts, it seems like this problem were corrected!
I highly recommend this script to be used while doing image upload, or should be placed in "Utilities" under Gallery Download - "user contributed customizations and utilities".
Posts: 8601
read carefully.. it only mentions thumbnails. we currently don't have any option to create resizes on upload.
Posts: 4
I am having trouble running this script. It prompts me for the password, I enter it, then it gives me the following error:
Fatal error: Call to a member function on a non-object in /home/lewisfam/public_html/photos/lib/tools/buildallderivatives.php on line 9.
This appears to be the problem area in the script, but I cannot figure out what the problem is.
7 require_once(dirname(__FILE__) . '/../../embed.php');
8 $ret = GalleryEmbed::init();
9 if ($ret->isError()) {
10 return array($ret->wrap(__FILE__, __LINE__), false, null);
11 }
Perhaps GalleryEmbed::init() is failing for some reason? I am running 2.1.2. Thanks for any help. I really want to pre-generate my various image sizes because I am having performance issues.
Bryan
Posts: 8601
change if ($ret->isError()) to if ($ret)
(but since you're using 2.1.x, easier to just go to Site Admin / Maintenance and run the task there..)
Posts: 22
Although this thread seems a little outdated. I am looking for a possibility to automatically create pre-build all thumbnail and slideshow images by scheduling some kind of script to my cron. Is there something available to do so?
Posts: 16504
It's more than a little outdated, it's obsolete now. Gallery 2.3 was just released about an hour ago and it includes a completely improved slideshow plugin that's 1000's of times better than the slideshow plugin that was in 2.2.x and older. I never had slideshow enabled in any of my Gallery installs until 2.3 because it was so horrible, IMO.
If you want to see the new slide show check, click the link to my site below, to to any album and click on Slideshow on the left. Install the 3d add-on for an even cooler effect.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 22
You're right! CoolIris is pretty Cool!
However I guess that even CoolIris want's cached resized images if you want to have it perform smooth and responsiveness especially when you run Gallery2 on rather slow (but very low power) hardware.
Posts: 16504
There's an oxymoron if I've ever seen one. ;) Slow but powerful hardware, what is your server a diesel engine from a semi-truck? ;)
Actually Piclens/CoolIris right now is grabbing only 2 things as far as I understand it. The thumbnails or the full size version, or the biggest version the user has permission to view.
See valiant's response in this thread. http://gallery.menalto.com/node/82411
Otherwise it kind of sounds like you want something that's really "offline" not accessing Gallery to view.
Maybe one of these options will get you there or somewhere close:
http://codex.gallery2.org/Gallery_Local
http://gallery.menalto.com/node/51945
http://dvd-baker.sourceforge.net/
I have no idea if any of those are compatible with 2.2.x let alone 2.3
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 22
nivekiam,
valiant's response shows at least that I should not worry about resizing my images anymore. However I would like to publish my full resolution pictures of my Nikon D200. Since it will require quiet some bandwidth for smooth browsing I will need to publish lower resolution files as well. My webserver is behind my ADSL internet connection and has a limited up-speed.
A practical solution would be to publish the images in two directories and resize them before hand but I am not very fond of that.
Posts: 37
I downloaded it and installed it where you said.. when i type in http://www.deltasoldiers.com/gallery/lib/BuildAllDerivatives.php i get a 404 ...how do i access it? I also have Gallery Client 1.5