Hi all, just one problem with my wordpress/gallery install. It has worked fine, but I just bought a new camera and since it is taking larger sized images the resizes are no longer the same, and for some reason the lightbox pulls the full sized image insted of the resize to display. So this makes the lightbox popup huge (as the full size images are like 3000 wide).
I've searched the forums for my problem, and it appears the fix it to change the setting for the min. lightbox size. I've tried changing this value to the same as the resize that I want to use, a little blow that, and a little above that but nothing seems to me working.
Any ideas? Thanks.
-StarScream
Posts: 13
Hi guys, I actually forgot to mention my version information. Note that I've updated WPG2 to the snapshot same with the wordpress embedded theme... For the rest see below:
Wordpress: 2.3.3
Gallery version = 2.2.4 core 1.2.0.6
PHP version = 5.2.5 cgi-fcgi
Webserver = Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8g DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database = mysql 5.0.45-community-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, Thumbnail, Gd, Getid3, ImageMagick
Acceleration = full/1800, full/3600
Operating system = Linux box289.bluehost.com 2.6.22-9_1.BHsmp #1 SMP Sun Feb 10 15:57:22 MST 2008 x86_64
Default theme = wordpressembedded
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
Rows in GalleryAccessMap table = 49
Rows in GalleryAccessSubscriberMap table = 5466
Rows in GalleryUser table = 2
Rows in GalleryItem table = 5461
Rows in GalleryAlbumItem table = 111
Rows in GalleryCacheMap table = 24
StarScream
Posts: 1378
Hiya StarScream,
The issue will be either..
A) The minimum size you have specified in the WPG2 lightbox options and the size of resized image. Remember Gallery2 resizes an image keeping its ratio (width * Length) thus although you may have specified a resized image of 800px in reality's your images could be smaller (and most likely will be)..
B) Lack of Gallery2 (most likely guest) permission to view the resized image..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 13
Hi Greg,
Thanks for the reply.
A) The resized images are 640x428 and 800x536 and original 3872x2592. I've set the min. size in the WPG2 lightbox options to 599 (this was the setting before, when it worked okay -- but now shouldn't because they are 536 or smaller -- so that makes sense), 428, 427, 429. I don't get it... I've looked at the theme.inc file and found where the logic is for selecting, but it doesn't make sense to me. When I follow the code, it to me looks like it will always grab the largest image. Maybe I'm not as good with PHP as I thought.
B) I'm testing logged in with admin; so I have access to view all the images - so no matter what it should be able to grab the resizes. And on the flip side, if I disable lightbox, I can view all resizes while logged in or logged out. I really don't think it is a permission issue.
Any other ideas?
Posts: 1378
StarScream,
Firstly, I know the logic works fine as I tested it extensively. The issue will be in the real height of the resized image which to remind you will NOT be the precise size that you have entered in the resized dimension boxes on your album settings. (FYI WPG2 only uses height to calculate what image size fit).
My suggestion, drop the lightbox minimum size down to 300, since the average thumbnail size is 150 that is more than enough to ensure the thumbnail is not selected
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 13
I'm sorry if I've mislead... I don't bet the logic doesn't work. It is just a little confusing to me.
I realize that the actual resized images will not be what I set in the album settings; and I thought that I made it clear... my image sizes available to the public are 640x428 and 800x536 and the original 3872x2592. (Note that these are the resized images and NOT the settings I have in the album (which are 600x600 and 800x800).) So how should I set "Lightbox Image Minimum Height" if this is the case, because from what I can see setting the "Lightbox Image Minimum Height" to (either) 428 (or 427/429) will grab the smallest resize? No?
I have re-enabled lightbox on my site, with the "Lightbox Image Minimum Height" option set to 300, per your suggestion, and I am still having the problem. But now it appears to only be doing it to random images. Which really doesn't make sense, as all the images are the same size (except for portrait shots, which I understand possibility wouldn't work due to the different resizes). If you want to see for yourself; the direct link to the album in question is: [removed] . Page two seems to have a lot of images that are grabbing the full-size for the lightbox, I suggest viewing that page for more examples.
If this really is a "fluke," then I will disable the lightbox feature; however I'd really rather get to the bottom of this very odd problem as I like lightbox too much... ;).
Posts: 22
I have the same problem with my site. Following the information above in this thread, I set the min size to 500 (in wpg2 lightbox settings page).
This page shows mixed sized images in lightbox: http://www.donggiang.com/post/481
The first photo is shown full-size (1600x1067) while the other two are shown at the "correct" size (800x534) (there is 640x427 size available as well). The same page used to show all three photos using the full-size versions. The only "change" was that I visited the last two photos in their album (i.e. in gallery2) to check their available sizes. I think the cause for this problem is the intermediate size (i.e. resize) versions are not automatically created by gallery until someone actually look at the photos. One solution, perhaps, is to instruct gallery to create resizes immediately when a photo is uploaded. However, it would be ideal if wpg2 can instruct gallery to do that on demand basis (i.e. to create intemediate sized versions).
Posts: 1
Starscream and Trungdong,
I had this problem too and after spending hours, finally i figured it out.
Lightbox will only display the smallest image. So after uploading images to the album, you need to set different target sizes. After setting the target sizes for your album, YOU ALSO NEED TO BUILD RESIZE TOO because the image will only be built when someone visits it.
So here the instruction:
1) Select "edit album"
2) Select "Album" tab at the top
3) Check "Apply album setting to resized images", ".. and for all subalbums", "Build resizes too"
* step number 3 is to resize the images manually right away without waiting for users to visit the image.
4) Click Save (it may take a while to build depends on how many images in your album) and you are done.
Van Nguyen
Posts: 1378
How are you all adding your photos into Gallery2? Because it looks like you do not have the automatic create resized images option turned on..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 13
Hey Van,
Your suggestion worked! Although, I took different steps to get it. I dunno if it was because I didn't clear my cache, or what, but when I followed your steps it didn't change anything, so I thought I might have to clear the re-sizes first...
1. Remove all resizes from settings (just unchecked them)
2. Saved changes (so it removed all resizes)
3. Re-set my resize options. (I entered the same resize settings, 600x600 & 800x800)
4. Rebuild resizes
5. Clicked save.
I bet your steps worked too, but because the album was cached I couldn't tell. I cleared the cache, and then did my steps above and it is working fine now... to my surprise. I really didn't think it was going to, as the resizes I entered back in where the exact same and the exact same images where created again. It really doesn't make sense to me at all. If anyone knows why, the second time around creating the resizes made it work that'd be awesome to know so that way every time I create an album I don't have to delete the resizes and recreate them.
Thanks again Van!
P.S. Now I was able to set my Ligthbox size from 300 to 450 and it is grabbing the second resize! Perfect!
Posts: 13
greg,
Haha, posted a few seconds after you. Are you talking to me about the resize create option? If so I thought I had it on, when I crate a gallery and upload the images all the sizes are there when I view the images; I realize that they are created if they don't exist when viewed but I mean then the images will load in slow for the first time right? They load in at normal speeds right after creation, so I can only assume that they are created upon upload. I know my thumbnails are created at upload, I always check that little box.
I suppose the next time I create an album, I could watch the process list on my server and see what exactly it is doing or I could see what my setting it set to in Gallery. Where is this setting located?
P.S. I add images to gallery through "local server," sometimes through a .zip file where it extracts and adds, and sometimes I upload just the jpg's and then select them in the add list.
Posts: 1378
From the Gallery2 Document -> http://codex.gallery2.org/Gallery2:Image_Size_Settings
You don't have to bother about generating thumbnails and resizes. They are generated automatically when they are needed. Since generating images is computationally expensive (it takes a moment to create a thumbnail or resize) you may want to have complete control on when exactly these images are generated.
A few add item methods (e.g. add item -> from browser) offer the Create thumbnails now in the upload view which forces G2 to generate the thumbnails right when the image is added and not later when it is first used. There is no such option for resizes yet.
You can force to generate / build all thumbnails and resizes of the whole installation by browsing to Site Admin -> Maintenance -> Build all thumbnails/resizes. This task can take hours if you have thousands of images, but it can also finish in a few seconds for only a few images if your server is fast enough. Note that during the execution of this task your server will be slowed down considerably. You may also want to put G2 into maintenance mode (see config.php) during this operation.
Thumbnails and resizes are not generated on each request. That would be too slow. Instead they are generated when they are first requested and then they are stored on the disk of your server. Note that thumbnails and resizes are derived from the original, thus we call them internally derivatives. That's why they are stored in cache/derivative/ in your G2 storage folder (usually g2data/).
I will add a warning about this in the WPG2 FAQ..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 74
I am having the same sort of problem, no idea what i am doing wrong !!
Here is a example,
The Post in wordpress : http://www.bordignons.net/?p=62
The pictures in gallery : http://gallery.bordignons.net/main.php?g2_itemId=29381&g2_navId=x65459ba0
I have gone though and re-created all the images a number of times and have even set the Lightbox Image Minimum Height down to 100 and it still displays the larger version (1024x1024), trying to get it to display the 640 one ! It is currently set back to 300.
Running WordPress 2.3.3 and the WPG2 3.0.2,
Gallery version = 2.2.4 core 1.2.0.6
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) PHP/5.2.0RC6-dev
Database = mysql 4.1.20-community-nt, lock.system=database
Toolkits = Exif, ImageMagick, Thumbnail, NetPBM, LinkItemToolkit, jpegtran, Gd
Acceleration = full/86400, full/86400
Operating system = Windows NT DISCOVERY 5.2 build 3790
Default theme = x_treme
gettext = enabled
Locale = en_GB
Browser = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506.30)
Rows in GalleryAccessMap table = 55
Rows in GalleryAccessSubscriberMap table = 5694
Rows in GalleryUser table = 4
Rows in GalleryItem table = 5649
Rows in GalleryAlbumItem table = 303
Rows in GalleryCacheMap table = 9285
Thanks
Matt.
Posts: 74
Sorry bump
Posts: 1378
matbor,
All the possible resolutions around lightbox issues are in this thread.. Sorry but I am pretty busy right now trying to get 3.05 out of the door and just do not have the time to spend on this issue until I get 3.05 out the door..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 74
Thx, had already tired all the suggestions and faqs even googled the problem, but no luck.
No hurry, will wait until u get the new version out the door and upgrade, might fix my problems.
Matt.
Posts: 1378
matbor,
It might, I found in certain situation IE 7 was incorrectly detecting the mime type of images which has been fixed in 3.05. Also I have added a fair degree of debugging code to help out as well.. 3.05 release should be out this week..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 34
I've just put together a fresh install of WP 2.5.1 and WPG2 3.05 (17:57 27/04/2008) and it all seems to be behaving. I also have the problem of lightbox displaying the fullsize image. However, I note that in the g2Image popup admin options (and the image insert popup), the lightbox option is for a link to the full image, so I guess it's doing what it is supposed to do. Is there any possibility of being able to select an intermediate image for the lightbox popup?
Many thanks for this plugin.
Posts: 1378
I believe the option to add intermediate sizes in G2image will be added in the next release (WPG2 3.1). Kirk has the code finished but we just ran out of time to fully test the new code... If you use the WPG2 Tags rather than the links then WPG2 should correctly select resized images for lightbox display rather than fullsized..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 34
Thanks ozgreg,
Using the WPG2 Tags for images rather than using the dedicated lightbox link does exactly as you say and the resized image is used.
Thanks again.
Posts: 1378
No issue, glad you got it all sorted, I always love posts like this
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 492
I've fixed G2Image to use the best resize for Lightbox images, but the code is in the G2Image SVN for version 3.1. Right now it is not compatible with WP 2.5 because I haven't ported over the changes that I just made for the upcoming WPG2 3.0.5. Once I get those changes ported over and get a few other issues straightened out, G2Image 3.1 will fix a lot of the little nagging issues like this.
Thanks,
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 74
Hi Ozgreg, well I have upgraded and done everything you suggested, apart from re-installing, trying to avoid that at this stage.
I upgraded WPG2 to the latest version and also gallery2.
Default image size is set to 150 in WPG2 settings.
gallery2 has the photos uploaded at 1024 but it has 2 other smaller resize settings 640 and 800. I always resize after uploading them and also go though one by one to make sure it has generated the 640 size image, yet it still doesn't let me view the image in 640 on the wordpress page !
example, fresh one done today....
Wordpress page :
http://www.bordignons.net/?p=74
Gallery page :
http://www.bordignons.net/?page_id=70&g2_itemId=30412
any more ideas ? you mentioned something about debugging option in the new version of WPG2! where do i find that ?
Thanks
Matt.
Posts: 1378
matbor,
As has already been posted this is not a WPG2 bug, the issue will be
A) you have not rebuilt the resized Gallery2 images
B) the aspect ratio of your photos is smaller than the size you are specifying
C) The order of resizes in your album settings are not set from lowest to highest
I know this feature works because I tested it pretty much to death because of posts like this..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo