swehner / bilekto

Image gallery with strong focus on simplicity and good mobile experience

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bilekto Image Gallery

Image gallery with support for mobile and desktop environments and with a strong focus on simplicity.

Basic principles:

  • Very easy to deploy, no databases required, information about images is directly read from the filesystem
  • Responsive, good UX for both mobile and desktop (in big part thanks to the included PhotoSwipe library)
  • Thumbnails can be generated on the fly or stored on disk, with the possibility to extract them from EXIF
  • Images can be downloaded in a single ZIP archive to simplify sharing to other users

Live demo

Bilekto Demo

Requirements

  • PHP >= 5.3
  • PHP gd module
  • zip (optional, for archive downloads)
  • ffmpeg (optional, for video thumbnail generation)

Installation and configuration

Bilekto is designed to be very easy and quick to install. You only need these steps:

  • Copy config.ini.dist to config.ini
  • Adjust the basic settings (gallery_name and gallery_path)

And you are done!

For more detail on the configuration parameters, see the description in the next subsections and in the config.ini.dist itself

Thumbnail caching

Bilekto doesn't require thumbnails to be pregenerated, as it can generate them on the fly. Nevertheless, performance can be heavily improved if the thumbnails are cached on disk. This is configured by the setting caching in config.ini with these possible values:

  • disabled: No cache at all, thumbnails are always generated on the fly
  • ro: Read-only cache, use the cached thumbnail if found on disk, but don't attempt to write it when it's not found and it has to be generated on the fly. For this to make sense you should run the script pregenerate-cache.php to write all thumbnails for your gallery images
  • rw: Read-write cache, which means that if the cached thumbnail is not found and it has to be generated on the fly, it's also stored to disk for the next requests. It means you don't need to pregenerate the cache, but you also need to take care of the write permissions for the user running the PHP process

There's also the possibility to generate the thumbnail directly from the EXIF thumbnail, activating the exif_thumbnails config parameter. But take into account that in most cases the EXIF thumbnail generated by digital cameras is not bigger than 160x120, which is not enough for the default 360x360 used by Bilekto. So unless you have regenerated your EXIF thumbs with a higher resolution, there will be no benefit on activating this option

URL format

Bilekto supports three url formats, adapting to your needs and your web server configuration. They are configured by the url_mode parameter, with these allowed values:

  • query_string: Basic mode, no special server configuration required. Example: http://my.gallery/?q=view/myAlbum/
  • path_info: Requires that the cgi connection sends this variable to PHP. Example: http://my.gallery/index.php/view/myAlbum/
  • rewrite: Requires full URL rewrite from the web server (a sample Apache .htaccess is provided). Example: http://my.gallery/view/myAlbum/

ZIP archive

By default Bilekto allows users to download a ZIP archive of the full gallery or of a subdirectory. The ZIP is generated on the fly (so it doesn't take up space on disk) and without compression (so it doesn't eat CPU resources)

If you don't want to allow this, make sure that the option allow_downloads is set to false.

Multi gallery installation

If you want to have several independent galleries, instead of copying the full Bilekto code into every gallery, you can share a common installation among all of them. Just follow this steps:

  • Create your new gallery directory
  • Symlink index.php and static from the common installation to the gallery path
  • Copy gallery_multi.php from the common installation to the gallery path, and change the options you need

And you are done!

License

The application is distributed under the MIT license. The included PhotoSwipe code by Dmitry Semenov is also originally distributed under the MIT license.

All the images included in the default gallery are CC0 from Pixabay

About

The name 'Bilekto' comes from 'bildo-kolekto', which means 'image collection' in Esperanto.

About

Image gallery with strong focus on simplicity and good mobile experience

License:MIT License


Languages

Language:JavaScript 67.3%Language:PHP 23.8%Language:CSS 9.0%