Skip to content

cisoun/Galerie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Galerie

A small photo gallery in a single PHP file.

preview_1500

Features

  • No dependencies
  • Less than 100 lines of code
  • Responsive (masonery style)
  • Dark mode support
  • Custom lightbox with navigation by gesture, arrow keys and clicks
  • Lazy loading (load images on scroll)
  • Support for JPEG/PNG/GIF/WEBP files (can be extended)

Installation

Just copy index.php and your pictures into a folder on your server.

F.A.Q

Can I add another image format?

Yes. Just add the extension in the header PHP code.

I don't need lazy loading, how can I remove it?

Remove the getimagesize PHP call and the loading="lazy" attribute in the <img> element.

How can I prepare my photos easily?

You can use GraphicsImagick (or ImageMagick) to optimise your photos. For instance, transform your photos by running this command:

for i in *.jpg; do
	gm convert $i -resize 1500x1500 photos/$(basename $i)
done

License

Copyright © 2023 Cyriaque Skrapits

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses.

About

A small photo gallery made in PHP/HTML/JS/CSS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages