1 (edited by snaky 2023-03-20 09:30:25)

Topic: Thumbnail issue on WP-Juicebox with NextGen as image source

Hello, I used Juicebox Pro for few years, and recently I am planning to switch my site to WordPress.

I built a wordpress and added the WP-Juicebox plugin without issue.  Since WP-Juicebox with Media Library as image source is not very friendly for manging the gallery, so I used NextGen.

Thumbnail is able to display if I used WP-Juicebox with Media Library.

However, thumbnail is not showing while I used WP-Juicebox with NextGen. The thumbnail image is showing black box only.

I confirmed NextGen is generated the thumbnail correctly, and I can managed the thumbail on NextGen.

Would you give me some idea...?

Re: Thumbnail issue on WP-Juicebox with NextGen as image source

That's odd. I've just created a gallery using WordPress v6.1.1, WP-Juicebox v1.5.1.4 and NextGEN Galery v3.35 (a WP-Juicebox gallery using a NextGEN gallery as the source of images) and both the main images and thumbnails appear as expected.

Being that I'm not able to reproduce the error, could you please post a link to your dysfunctional gallery's web page so that I can investigate and hopefully help further? Thank you.

Re: Thumbnail issue on WP-Juicebox with NextGen as image source

Steven @ Juicebox wrote:

That's odd. I've just created a gallery using WordPress v6.1.1, WP-Juicebox v1.5.1.4 and NextGEN Galery v3.35 (a WP-Juicebox gallery using a NextGEN gallery as the source of images) and both the main images and thumbnails appear as expected.

Being that I'm not able to reproduce the error, could you please post a link to your dysfunctional gallery's web page so that I can investigate and hopefully help further? Thank you.

Hello Steven, thanks for the reply. I believe this is my Wordpress configuration issue or permission issue on my IIS server (or windows folder permission).

This is the link for WP-Juicebox with Media Library, both main image and thumbnail are fine.
https://wp-test.8014.net/blog/2023/03/20/test/

This is the link for WP-Juicebox with NextGEN, main image is fine, but thumbnail does not display..
https://wp-test.8014.net/blog/2023/03/20/test-2/

Thanks for your help..

Re: Thumbnail issue on WP-Juicebox with NextGen as image source

Thanks for the links.

The paths to the thumbnails in your WP-Juicebox gallery's XML file all look fine.
Here's the path (taken from the gallery's XML file) to the first thumbnail in the gallery:
https://wp-test.8014.net/wp-content/uploads/sites/1/nggallery/test-1/thumbs/thumbs_test2.jpeg

This looks to be OK. Inside the 'test-1' folder in the path is a subfolder named 'thumbs' (expected for NextGEN) and the filename for the thumbnail image itself has the prefix 'thumbs_' (also expected for NextGEN).
However, when I go directly to the location above in a browser, I get an error 404 (file not found).

Also, going directly to /wp-content/uploads/sites/1/nggallery/test-1/thumbs/ results in an error 403 (forbidden).

Please check that the file structure on your web server matches the expected structure from the paths in the gallery's XML file.

First of all, FTP into your /wp-content/uploads/sites/1/nggallery/test-1/ folder to make sure that there is actually a folder named 'thumbs' there.
Then check inside the 'thumbs' folder (if it exists) to see if you thumbnail image files are there. (They should all have the prefix 'thumbs_'.

If everything seems to be present on your web server, then check the permissions on the files and folders to make sure that they are not too restrictive.
Default permissions of 755 for folders (i.e. the 'thumbs' folder) and 644 for files (all the files inside the 'thumbs' folder) should be fine.

I hope this helps.

Re: Thumbnail issue on WP-Juicebox with NextGen as image source

Steven @ Juicebox wrote:

Thanks for the links.

The paths to the thumbnails in your WP-Juicebox gallery's XML file all look fine.
Here's the path (taken from the gallery's XML file) to the first thumbnail in the gallery:
https://wp-test.8014.net/wp-content/upl … test2.jpeg

This looks to be OK. Inside the 'test-1' folder in the path is a subfolder named 'thumbs' (expected for NextGEN) and the filename for the thumbnail image itself has the prefix 'thumbs_' (also expected for NextGEN).
However, when I go directly to the location above in a browser, I get an error 404 (file not found).

Also, going directly to /wp-content/uploads/sites/1/nggallery/test-1/thumbs/ results in an error 403 (forbidden).

Please check that the file structure on your web server matches the expected structure from the paths in the gallery's XML file.

First of all, FTP into your /wp-content/uploads/sites/1/nggallery/test-1/ folder to make sure that there is actually a folder named 'thumbs' there.
Then check inside the 'thumbs' folder (if it exists) to see if you thumbnail image files are there. (They should all have the prefix 'thumbs_'.

If everything seems to be present on your web server, then check the permissions on the files and folders to make sure that they are not too restrictive.
Default permissions of 755 for folders (i.e. the 'thumbs' folder) and 644 for files (all the files inside the 'thumbs' folder) should be fine.

I hope this helps.

Thanks for your help!! This information is very useful!
This is very strange. I verified the physical path and err 404 is not permission issue. And I reviewed again the thumb jpeg file path you checked on my XML file. The file name is different with my server.

From XML, thumb file name is thumbs_test2.jpeg. But file on physical folder is thumbs-test2.jpeg.

I did another test to copy same file of thumbs-test2.jpeg and rename the file to thumbs_test2.jpeg, then the thumbnail can be display correct on my WP-Juicebox page......

So the problem is why NextGEN generated the thumbnail files as "thumbs-" not "thumbs_".

Let me further check why this happen on my NextGEN.

Thanks for your help again.

6 (edited by snaky 2023-03-22 01:05:51)

Re: Thumbnail issue on WP-Juicebox with NextGen as image source

Hello Steven, thanks again for your help. I finally get this fixed by changed one setting on NextGEN.

In NextGEN, Other Options, Miscellaneoue, this is an option named "Use dashes instead of underscores when generating new image files". I changed the setting from Yes to No, and removed all the image file and reupload it. Then the thumbnail file names now become thumbs_xxxxx.jpeg, and thumbnails on WP-Juicebox can be display now.

Re: Thumbnail issue on WP-Juicebox with NextGen as image source

Thank you for your notes and help in tracking this down.

In order to fix this within WP-Juicebox, I'd need to fetch the corresponding thumbnail URL for each individual image rather than hardcoding "thumbs_" as a prefix for each thumbnail (which NextGen Gallery always used to do until v3.21) and then appending the image filename.
This sounds simple enough until I discovered that there is no thumbnail-related entry in the individual NextGEN image properties.

I could fetch the global value for NextGEN's "Use dashes instead of underscores when generating new image files" switch but I would just have to apply this to all images in all galleries and it would break all thumbnails created if/when the switch was in one position or the other (just like the current status when using dashes). As far as I can tell, there's no way to programmatically determine which galleries were created with the switch in any particular position. In fact, it's entirely possible that a single gallery could have thumbnails with both underscores and dashes (for example, if you were to upload a few images to a gallery with the switch set to 'Underscores' and then upload a few more images afterwards with the switch set to 'Dashes'). I'd really need to determine the corresponding thumbnail URL for each individual image and this does not seem to be possible.

I think all I can do is either:
(1) Feed WP-Juicebox the full-sized NextGEN images to be used as the Juicebox gallery's thumbnails and have Juicebox dynamically resize them when the gallery is viewed.
... or:
(2) Give the WP-Juicebox user the option to set the NextGen separator to either 'Underscore' or 'Dash' on a per gallery basis (in each WP-Juicebox gallery settings window) and trust that the NextGen user does not have a gallery which uses both. At least this will use the dedicated NextGEN thumbnails as the Juicebox thumbnails.

I'll think it over for the next version of WP-Juicebox.
In the meantime, I'm glad that you've found the cause of your problem and found a suitable workaround.
Thanks, again, for taking the time to document this issue. It's most appreciated.