338 Comments

Thanks for the code it was really helpful, But is there any way to make the transition to next image little more animated or smooth so that the black loading screen doesnt show up… It will look much smoother if the next image transition becoms little smooth and eye catchy. Could anyone plz help me out.. tried my brains out but couldnt figure it out..

Hello Malihu.
I have an album with 300 images in it. It is undesirable to have that many images to scroll through on one page. Is it possible to have buttons somewhere on your fullscreen Image Gallery page, say top right, which link to pages within my album. Say, for example, five clickable pages with 60 images for each gallery of the album?
I have read through the hundreds of comments and saw that you had planned to do something like this back in 2012. Did you manage that? I hope you have time to reply to this comment and possible have a solution for me.
regards

Thanks for this, finally a gallery that (after a bit of finetuning) can be turned in the minimalistic gallery I’ve been after for quite a while.

I’ve taken the liberty to adjust the index page to include some php code, so no adjustments have to be made to make a new gallery.
The page has to be changed into a index.php page and these bits of code have to added:
at the beginning:
<?php
$images=scandir('images');
array_shift($images);array_shift($images);
?>
(the double array_shift is needed to delete the ‘.’ and ‘..’, that are the first two results of the scandir)
right after the tag, this has to be added/changed:
<?php
$exif=exif_read_data('images/'.$images[0]);
?>
<div id="bg"><a href="#" class="nextImageBtn" title="next"></a><a href="#" class="prevImageBtn" title="previous"></a><img src="images/<?php echo $images[0];?>" title="<?php echo $exif['Title'];?>" id="bgimg" /></div>
A simple loop then reads the filenames and the titles (this presumes you add titles in the exif)
<?php
foreach ($images as $image)
{$exif=exif_read_data('images/'.$image);
echo '<div class="content">';
echo '<div><a href="images/'.$image.'"><img src="thumbs/'.$image.'" title="'.$exif['Title'].'"';
echo 'class="thumb" /></a></div></div>';
}
?>
This presumes the thumbnails go in a folder ‘thumbs’, which I personally prefer, becuase they can have the same names then. But this of course can be adjusted to whatever one prefers.

Firstly, I love this plugin. And its very important for the temple website I’m designing. But there’s some modification I need to do. I tried understanding the code and the css as well but no luck. I want to limit the div with class container to fit inside the screen. I have integrated another javascript file to allow user to swipe through the thumbnails. This script creates buttons so that desktop users can scroll through the thumbnails using these arrows(buttons). So the main problem is limiting the width of the div with class container to the screen width of the device.

It would be nice if you can have a link to every image in the gallery, because there is only a link to the gallery, but a link to single images would be nice.
it would be also great it there was a possibility to have different gallery categories

Hello Malihu, first of all, thanks.
I mixed version 1 and version 2, but I’m having an issue with the “bgimg” display tag, when I load the website or click a thumbnail, the style gets to “display:none;”. Is there a way to fix this within the “gallery.js”?

Hi there, great work on this gallery. The only thing I find that would make this really perfect is the ability to sort the images. Right now I find that they are displayed based on file name and not based on the order in which they were added. Is it possible to make the images display in the order that that they were uploaded? ie the latest images show first and the older ones display later? Thanks in advance.

I have tried to create a separate JS sheet for this great design – but i cannot separate the code from the html page and keep it functional. Wanted to use in multiple pages with one js sheet download for efficiency. Can the js code be done in a separate .js sheet? And yes I have deleted the in my attempts – nothing but js code on the page. In my attempts – the scroll bar appears but not the background image.

The only things that would need to change in the HTML example is you would have to wrap the large image in the #bg div in an <a href="" class="parent-link"> tag and then add a data-link attribute with your URL to the thumbnail image like <img src="your-thumbnail.jpg" alt="alt" title="title" data-link="link-to-your-page.html">

I already resolve how to get the path from my database and use it in the img, when I click on the next button change to the next picture, when I get to the last picture and click next it show me the first picture but when you click next again show the first again and again.

This is AMAZING thank you. I was just wondering, is there a way NOT to enlarge photos that are not big enough by default to fill the screen. Currently, smaller pictures just get enlarged (and so become blurry)

«Free software» means software that respects users' freedom and community. Roughly, the users have the freedom to run, copy, distribute, study, change and improve the software. With these freedoms, the users (both individually and collectively) control the program and what it does for them. — GNU, The Free Software Definition