Greybox Image Gallery - Images don't load on initial click

1.1k views Asked by At

I am using greybox to display images in an image set. When I clock on one of the links, the image set appears, but the pictures do not load the first time (it just shows a white background - see attached image). If I move forward one place in the image set and then back it will render properly.

I am loading the following files in the section, and the GB_ROOT_DIR variable is set. Any suggestions? Thanks!

<script type="text/javascript" src="greybox/AJS.js"></script>
<script type="text/javascript" src="greybox/AJS_fx.js"></script>
<script type="text/javascript" src="greybox/gb_scripts.js"></script>
<link href="greybox/gb_styles.css" rel="stylesheet" type="text/css" />

enter image description here

2

There are 2 answers

1
nktokyo On BEST ANSWER

Figured it out - the image for my thumbnail (square) and what was to be loaded in the greybox (oblong) were two physically different files. GB doesn't handle that for some reason.

0
Dennis Winter On

Actually, if you were using Greybox v5.54 when you ran into this problem, you most likely were victim of a bug reported in this version, which is somehow related with (pre-)loading the pictures.

Try absolute paths for your gallery items. Fixed that behavior for me.