Generate static HTML photo / video galleries
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github chore(build): automatically build and publish the Docker image with T… Jul 20, 2018
bin fix(log) Only show error summaries on stdout, and full errors in the … Jul 4, 2018
docs Move screenshots and banners to subfolder Nov 24, 2017
scripts fix(build): Revert 3ec009e + Travis deployment condition + extract Tr… Jul 25, 2018
src fix(metadata): support the ContentCreateDate field for videos Sep 2, 2018
test-fixtures refactor(tests): dynamically generate test folders to check more edge… Jun 16, 2018
test fix(metadata): support the ContentCreateDate field for videos Sep 2, 2018
.dockerignore chore(build): automatically build and publish the Docker image with T… Jul 20, 2018
.editorconfig Render progress using Listr + split the main process into "steps" whi… Nov 5, 2017
.gitignore refactor: themes are now standalone folders, to prepare for external … Jun 1, 2018
.requirelintrc fix(build): handle theme dependencies which are not directly referenced Jul 19, 2018
.travis.yml fix(build): Revert 3ec009e + Travis deployment condition + extract Tr… Jul 25, 2018
Dockerfile.release fix(docker): use a HOME every user has access to Aug 29, 2018
Dockerfile.test chore(build): automatically build and publish the Docker image with T… Jul 20, 2018
LICENSE.md Prepare for npm publish (ignore tests, cleanup license...) Nov 13, 2016
README.md docs(readme): add documentation URL at the top of the README Jun 8, 2018
package-lock.json 2.4.2 Aug 29, 2018
package.json 2.4.2 Aug 29, 2018

README.md

thumbsup

NPM License Standard - JavaScript Style Guide

Travis CI Docker Hub Dependencies Dev dependencies

Twitter LinkedIn Facebook


https://thumbsup.github.io

Banner


Turn any folder with photos & videos into a web gallery.

  • thumbnails & multiple resolutions for fast previews
  • mobile friendly website with customisable themes
  • only rebuilds changed files: it's fast!
  • uses relative paths so you can deploy the pages anywhere
  • works great with Amazon S3 for static hosting

Quick start

Simply point thumbsup to a folder with photos & videos. All nested folders become separate albums.

npm install -g thumbsup
thumbsup --input ./photos --output ./gallery

Screen recording

There are many command line arguments to customise the output. See the website for the full documentation: https://thumbsup.github.io.

Requirements

Thumbsup requires the following dependencies:

And optionally:

  • FFmpeg to process videos: brew install ffmpeg
  • Gifsicle to process animated GIFs: brew install gifsicle

You can run thumbsup as a Docker container (thumbsupgallery/thumbsup) which pre-packages all the dependencies above. Read the thumbsup on Docker documentation for more detail.

docker run -v `pwd`:/work thumbsupgallery/thumbsup [...]

Sample gallery

See a sample gallery online at https://thumbsup.github.io/demos/themes/mosaic/

sample gallery

Command line arguments

This reflects the CLI for the latest code on master. For the latest published version please refer to the docs on the website.



 Usages:
   thumbsup [required] [options]
   thumbsup --config config.json


Required:
  --input   Path to the folder with all photos/videos  [string] [required]
  --output  Output path for the static website  [string] [required]

Output options:
  --thumb-size            Pixel size of the square thumbnails  [number] [default: 120]
  --large-size            Pixel height of the fullscreen photos  [number] [default: 1000]
  --photo-quality         Quality of the resized/converted photos  [number] [default: 90]
  --download-photos       Target of the photo download links  [choices: "large", "copy", "symlink", "link"] [default: "large"]
  --download-videos       Target of the video download links  [choices: "large", "copy", "symlink", "link"] [default: "large"]
  --download-link-prefix  Path or URL prefix for linked downloads  [string]
  --cleanup               Remove any output file that's no longer needed  [boolean] [default: false]
  --concurrency           Number of parallel parsing/processing operations  [number] [default: 4]
  --gm-args               Custom image processing arguments for GraphicsMagick  [array]
  --watermark             Path to a transparent PNG to be overlaid on all images  [string]
  --watermark-position    Position of the watermark  [choices: "Repeat", "Center", "NorthWest", "North", "NorthEast", "West", "East", "SouthWest", "South", "SouthEast"]

Album options:
  --albums-from            How files are grouped into albums  [array] [default: ["%path"]]
  --sort-albums-by         How to sort albums  [choices: "title", "start-date", "end-date"] [default: "start-date"]
  --sort-albums-direction  Album sorting direction  [choices: "asc", "desc"] [default: "asc"]
  --sort-media-by          How to sort photos and videos  [choices: "filename", "date"] [default: "date"]
  --sort-media-direction   Media sorting direction  [choices: "asc", "desc"] [default: "asc"]

Website options:
  --index                 Filename of the home page  [default: "index.html"]
  --albums-output-folder  Output subfolder for HTML albums (default: website root)  [default: "."]
  --theme                 Name of a built-in gallery theme  [choices: "classic", "cards", "mosaic"] [default: "classic"]
  --theme-path            Path to a custom theme  [string]
  --theme-style           Path to a custom LESS/CSS file for additional styles  [string]
  --title                 Website title  [default: "Photo album"]
  --footer                Text or HTML footer  [default: null]
  --google-analytics      Code for Google Analytics tracking  [string]

Deprecated:
  --original-photos     Copy and allow download of full-size photos  [boolean] [default: false]
  --original-videos     Copy and allow download of full-size videos  [boolean] [default: false]
  --albums-date-format  How albums are named in <date> mode [moment.js pattern]  [default: "YYYY-MM"]
  --css                 Path to a custom provided CSS/LESS file for styling  [string]

Options:
  --version      Show version number  [boolean]
  --help         Show help  [boolean]
  --config       JSON config file (one key per argument)  [string]
  --log          Print a detailed text log  [choices: null, "info", "debug", "trace"] [default: null]
  --usage-stats  Enable anonymous usage statistics  [boolean] [default: true]
  --dry-run      Update the index, but don't create the media files / website  [boolean] [default: false]


 The optional JSON config should contain a single object with one key
 per argument, not including the leading "--". For example:
 { "sort-albums-by": "start-date" }


Contributing

We welcome all issues and pull requests!

If you are facing any issues or getting crashes, please try the following options to help troubleshoot:

thumbsup [options] --log debug
# [16:04:56] media/thumbs/photo-1446822622709-e1c7ad6e82d52.jpg [started]
# [16:04:57] media/thumbs/photo-1446822622709-e1c7ad6e82d52.jpg [completed]

thumbsup [options] --log trace
# [16:04:56] media/thumbs/photo-1446822622709-e1c7ad6e82d52.jpg [started]
# gm "identify" "-ping" "-format" "%[EXIF:Orientation]" [...]
# gm "convert" "-quality" "90" "-resize" "x400>" "+profile" [...]
# [16:04:57] media/thumbs/photo-1446822622709-e1c7ad6e82d52.jpg [completed]

If you want to contribute some code, please check out the contributing guidelines for an overview of the design and a run-through of the different automated/manual tests.