Topic: galerie dont display correctly on mobile device

Hello, Im using JuiceBox pro since few years, and i have notice that on mobile device (android and apple) my galerie didnt show correctly.
First of all, when i click on a link to go to my galerie, on a mobile device, i arrive on a crop full screen of my first image with not text. Which is not normal.
Second, when i succeed to get out this full screen, the description texte is very low on the screen and cut. Normally it should be on the bottom of the picture.
But, if i put the device on landscape mode. Its correct.
Is it possible to fix those 2 problems? (i add some screenshoot)

The link to my galerie:
https://vincefx.com/galerie/ImagesArchi … Archi.html

Thank you

Re: galerie dont display correctly on mobile device

... i arrive on a crop full screen of my first image with not text...

What you are describing is the Splash Page.
The Splash Page is an image placeholder for the gallery which, when clicked, will expand the gallery to fill the browser viewport (to give the gallery as much room as possible).
By default, the Splash Page will be displayed on mobile devices when a gallery is embedded in a web page alongside other content (where the gallery might be too small to use).
Check out the Gallery Tour where there is a short section about the Splash Page.

Please check out the Splash Page configuration options here.

By default, Juicebox uses the first image in the gallery as the Splash Page image. You can change this if you like via the splashImageUrl option (in JuiceboxBuilder-Pro's 'Customize -> Splash Page' section).
You could also choose to not use the Splash Page at all by setting showSplashPage="NEVER".

Whether you use the Splash Page or not, on a mobile device, the gallery will be displayed in Small Screen Mode (check out the Gallery Tour link above for details) where thumbnails and main images are displayed on separate pages (to give the main images more room).
If you'd rather have the gallery displayed in Large Screen Mode (where thumbnails are displayed alongside the main images) on all devices and in all browsers, then you can set screenMode="LARGE" (in JuiceboxBuilder-Pro's 'Customize -> General' section).

... the description texte is very low on the screen and cut. Normally it should be on the bottom of the picture.

Your gallery currently sets maxCaptionHeight="70".
Try increasing the maxCaptionHeight (at least to the default value of 120) to give your captions more room. You'll find maxCaptionHeight in JuiceboxBuilder-Pro's 'Customize -> Caption' section.

Also, your gallery's first caption is:

<caption><![CDATA[</font><font color="#CCCCCC">Projet: Pecquencourt - Production: <font color="#0066FF"><a href="https://mw-architecture.fr/">MW Architecture </a><font color="#CCCCCC"> - Date: Novembre 2022  </font><br><font color="#0066FF"><a href="http://www.vincefx.com">www.vincefx.com </a><font color="#CCCCCC"> vincefx@free.fr tel:06.98.72.06.93]]></caption>

For a valid HTML 5 page, I'd recommend changing <font> tags for equivalent <style> tags as noted here (a little bit of work would be required but the resulting code would be HTML 5 compliant). Also, there's no need to start the caption with a closing </font> tag and you're missing a few </font> tags throughout your caption text.

Your gallery's embedding page actually has two galleries embedded into it (two lots of embedding code with with same 'juicebox-container' id).
I expect that you're just trying to embed one gallery so you should be able to remove one set of embedding code.
If you are trying to embed multiple galleries into a single web page, then you only need to load the 'juicebox.js' JavaScript file once per page (not once per gallery) and each gallery should be loaded into a <div> with a unique id.

I hope my notes above point you in the right direction.

Re: galerie dont display correctly on mobile device

Hello, thank you for your answer.
Indeed when i put "Never" to "showSplashPage" i dont have the problem when i arrive in my galerie. But its creates a new one. When i put my device in landscape mode, my pictures are too big, and the description is very far away.

Yes the max caption height fix the pb in portrait mode. But in landscape mode i dont know, because of the new problem with the "Never" "ShowSplashPage".


For the screen mode "Large" I prefer Auto. But, is it possible to have a button to return to the thumbnails when you are in full screen?


For the Caption HTLM, im really noob.... Can you show me for the first one, what would be the good HTLM? And i will apply it to the other pictures...

For my embedding gallery, i guess you talk about my htlm file? If yes, normally i have just change the title of the page. Except that, its the HTML create by JuiceBox. right now i have put the new JuiceBox's HTLM on my site. Do you still see multiple gallery?

Thanks a lot

Re: galerie dont display correctly on mobile device

When i put my device in landscape mode, my pictures are too big, and the description is very far away.

At the moment, your gallery looks good in both portrait and landscape orientations in Mobile Safari on my iPhone and in Mobile Chrome on an Android device.
If things look a little odd, then try clearing your browser's cache before reloading your gallery's web page to see if this helps to resolve the problem.

For the screen mode "Large" I prefer Auto.

It's usually a good idea to set screenMode="AUTO" (the default value) and allow Juicebox to determine whether to display the gallery in Large Screen Mode or Small Screen Mode (depending on the device being used to view the gallery).

But, is it possible to have a button to return to the thumbnails when you are in full screen?

In Small Screen Mode (whether you are in Fullscreen Mode or not), you can display the Thumbnail Button on the gallery's Button Bar (to allow the visitor to view the thumbnail pages) by setting showSmallThumbsButton="TRUE" (in JuiceboxBuilder-Pro's 'Customize -> Thumbnails' section).
You will need to display the Button Bar in your gallery, though, in order for the Thumbnail Button to be displayed (and your gallery currently hides the Button Bar by setting buttonBarPosition="NONE").

For the Caption HTLM, im really noob.... Can you show me for the first one, what would be the good HTLM? And i will apply it to the other pictures...

Your first image's caption is currently the following:

</font><font color="#CCCCCC">Projet: Pecquencourt - Production: <font color="#0066FF"><a href="https://mw-architecture.fr/">MW Architecture </a><font color="#CCCCCC"> - Date: Novembre 2022  </font><br><font color="#0066FF"><a href="http://www.vincefx.com">www.vincefx.com </a><font color="#CCCCCC"> vincefx@free.fr tel:06.98.72.06.93

You could change it to this to be HTML 5 compliant:

<p><span style="color: #cccccc;">Projet: Pecquencourt - Production: </span><a href="https://mw-architecture.fr/" style="color: #0066ff;">MW Architecture</a><span style="color: #cccccc;"> - Date: Novembre 2022 </span><br><a href="http://www.vincefx.com" style="color:#0066ff;">www.vincefx.com</a><spa style="color: #cccccc"> vincefx@free.fr tel:06.98.72.06.93</span></p>

This is HTML 5 compliant but it might not make a visible difference. Most browsers will likely still render the <font> tag OK and may be quite tolerant towards things like missing end tags.
If you don't see a visible difference, then you might not want to bother changing all your captions just now (as it is quite a large task) but it would be a good idea going forward (especially as your web page uses the HTML 5 Doctype Declaration).

For my embedding gallery, i guess you talk about my htlm file?

Yes. The embedding page is your 'ImagesArchi.html' file.

Do you still see multiple gallery?

I never actually saw two galleries on the page but there were two sets of embedding code (both embedding the same gallery into the same container).
Your web page only has one set of embedding code now, so that's good.

Re: galerie dont display correctly on mobile device

Thanks a lot for your answer.
I have tried the Button Bar, it works great in JuiceBox, but i dont know why, on my website it doesnt show. I have checked on a pc (firefox and Edge), and on android; and i have refresh all the cache.

I miss something?

Thank you

For the caption, i will try thank you.

Re: galerie dont display correctly on mobile device

Your gallery's Button Bar displays OK in my own desktop browsers and on my Android phone.
If you don't see the Button Bar yourself, then try clearing your browser cache before reloading your gallery's web page to ensure that the browser is loading the gallery's 'confg.xml' file fresh from your web server (with the new setting for buttonBarPosition) instead of using an older, cached version.

Incidentally, on mobile in portrait orientation, there's not much room for the Button Bar (due to the length of the Gallery Title) so the Button Bar spills over onto several lines. Try shortening the Gallery Title.
Also, in Small Screen Mode (on mobile devices), please note that the Button Bar is displayed only on main image pages and not on thumbnail pages.

Re: galerie dont display correctly on mobile device

yes sorry, i didnt change anything since my last post, but now its ok i have the buttonBar on all device.
Thanks a lot for all your help:)

Re: galerie dont display correctly on mobile device

You're welcome! I'm glad you've got it working. Thanks for letting me know.

9 (edited by fabienismyfriend 2025-07-20 23:41:27)

Re: galerie dont display correctly on mobile device

Splash Page Display Issue on Mobile Devices

Hello,
I believe I’m experiencing the same SPASH PAGE problem that vincefx reported back in 2023.

I've been using JuiceBox for several years, and I've noticed that my gallery does not display correctly on mobile devices (iPhone – tested on Safari, Firefox, and Chrome). It works perfectly on a Windows PC, but when I click a link to access the gallery from my smartphone : a fullscreen version of the first image.

The JavaScript seems to load properly (I’ve checked), but the gallery container is replaced by the first photo in the list.

From what I understand, this might be related to how the script is embedded. I suspect you might recommend avoiding the use of a table for layout purposes (may be to be replace by CSS flexbox ?), but before making any changes, I’d prefer to ask.

Thanks in advance for your help!

The link to my last website (I try to do my best with index.html & config.xml ;-) : http://lepec.and.co.free.fr/photo/2025gando/
The link to an older one with the same problem :  http://fabien.photo.free.fr/limousin2024/

Thank you for your help

Re: galerie dont display correctly on mobile device

@fabienismyfriend

Your galleries seem to be working as expected when I view them on mobile devices.
If a mobile device has been detected and the gallery is embedded on a web page with dimensions of less than 100% x 100% or if there is other content on the page (i.e. if the gallery is not the only element on the page and does not take up the full page), then the Splash Page will be displayed.
The Splash Page is a placeholder for the gallery which, when tapped, will expand the gallery on a new page of its own (to give the gallery more space).
By default, the Splash Page displays the first image in the gallery. You can change this to any image you like using the splashImageUrl configuration option (in JuiceboxBuilder-Pro's 'Customize -> Splash Page' section).

There are a few things you could try.

(1) If you simply do not want the Splash Page to appear, then you can set showSplashPage="NEVER" ('Customize -> Splash Page').
(2) Additionally, if you want the Large Screen Mode version of your gallery to be displayed on all devices, then you can set screenMode="LARGE" ('Customize -> General') but please bear in mind that some gallery elements may appear too small on mobile devices.

You could avoid the problem by ensuring that your gallery is the only element on your web page and that its dimensions are 100% by 100%.
Currently, your gallery has a height of 92% and there is a table on the page alongside the gallery.
If you were to remove the table and change the height of the gallery to 100%, then the gallery would fill the page and the Splash Page would not appear (but the gallery would still be displayed in Small Screen Mode on mobile devices which would be beneficial when viewing on small screens).

I'd recommend using the 'index.html' page from a gallery built with JuiceboxBuilder-Pro as a template (where the gallery is the only element on the page).

Also, if you check your current gallery's embedding page with the W3C Markup Validation Service, you'll see that there are some HTML errors on the page (such as a missing </body> tag at the end of the file). The info entries do not need attention but the errors really ought to be fixed.
If a web page does not contain valid HTML code, then the web page might be rendered by the browser in an unpredictable manner. Some browsers are more tolerant towards errors than others but if the code on the page is valid (i.e. no errors), then you can be sure that the page will display with consistency across all browsers.

I hope these notes point you in the right direction.

11 (edited by fabienismyfriend Yesterday 20:08:02)

Re: galerie dont display correctly on mobile device

Thanks, Stephen, for all this advice.
My main takeaway: to ensure this works, my gallery must be the only element on my web page and its dimensions must be 100% by 100%.
I ran two new tests: without a table (92%) and 100-100%.
They all work well on a Windows PC.

Ref:
http://lepec.and.co.free.fr/photo/2025gando
galleryHeight="92%"
<table
Results on iPhone IOS > >> SplashPage

New 1:
http://lepec.and.co.free.fr/photo/2025gandoxx
galleryHeight="92%"
<header
Results on iPhone IOS > >> SplashPage

New 2:
http://lepec.and.co.free.fr/photo/2025gandox
galleryHeight="100%"
Results on iPhone IOS > >> No SplashPage but 1 image!?

For now, I prefer New 1, because I don't have the gallery directly with New 2.
Why or what do you think?

Re: galerie dont display correctly on mobile device

My main takeaway: to ensure this works, my gallery must be the only element on my web page and its dimensions must be 100% by 100%.

This has to be true in order for the Splash Page to not be used on a mobile device without explicitly setting showSplashPage="NEVER".

New 1:
http://lepec.and.co.free.fr/photo/2025gandoxx
galleryHeight="92%"
<header
Results on iPhone IOS > >> SplashPage

The Splash Page is used on mobile devices in 'New 1' because the gallery is not 100% x 100% and there is another element on the page (a <header>).

New 2:
http://lepec.and.co.free.fr/photo/2025gandox
galleryHeight="100%"
Results on iPhone IOS > >> No SplashPage but 1 image!?

The Splash Page is not used on mobile devices in 'New 2' because the gallery is 100% x 100% and there are no other elements on the page.

The gallery displays in Small Screen Mode when viewed on mobile devices (thumbnails and images on separate pages).  You can navigate between images by swiping left or right and you can view the thumbnail page by tapping the Thumbnail Button on the Button Bar. Please see here for more information about Screen Modes.

The gallery goes straight to the first image in the gallery because you have set firstImageIndex="1" in your gallery's 'config.xml' file. If you remove firstImageIndex="1" from your gallery's 'config.xml' file, the gallery will initially display the thumbnail page (rather than the first image in the gallery).

I hope these notes help to clarify things a little.

13 (edited by fabienismyfriend Today 00:06:22)

Re: galerie dont display correctly on mobile device

Thanks Stephen,
It’s working now, especially after removing firstImageIndex="1"!
I have two types of pages that work!

New 1:
http://lepec.and.co.free.fr/photo/2025gando
galleryHeight="92%" with <header> (I removed the table)
Results on Windows PC >> Perfect in my opinion, the gallery integrates nicely, and with a common top banner, navigation is easy. You can return to the main page by clicking on the icon (cow!)
Results on iPhone (iOS) >> SplashPage appears, but that’s OK, with one click on the chosen image, it brings you straight to the gallery (in Small Screen Mode).

New 2:
http://lepec.and.co.free.fr/photo/2025gandox
galleryHeight="100%" x 100%
Results on Windows PC >> OK, with an improved title (including an image), but no clickable link back to the homepage. Also, on large screens, the thumbnails are far to the left of the photo, the split view is less appealing to me.
Results on iPhone (iOS) >> No SplashPage, it opens directly, responsive view works well.
The advantage is that the HTML code is very very simple, with no styles.css.

I'm still undecided. I guess you prefer... I mean, recommend 100x100 New 1 ;-) ?

Thanks again, really appreciate it