Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.
/ praze-cam1 Public archive

Praze is a simple HTML image viewer where you can cycle through the pictures with cursors or clicking by the image.

Notifications You must be signed in to change notification settings

kaihendry/praze-cam1

Repository files navigation

Praze

Demo site: http://cam.hackerspace.sg

  • Features low <150 source lines of code
  • Simple caching to make next image load quickly
  • Assumes images are retrieved in Epoch format
  • Supports WebP to JPEG conversion on the fly

Requirements

CGI support

Setup

Assuming your VirtualDocumentRoot is /web/%0.

Git clone into /web/praze.example.com

Link image directory into cloned directory:

ln -s ~/imagedirectory /web/praze.example.com/

webp to jpeg

Nginx configuration:

server {
	server_name cam.hackerspace.sg;
	root /srv/www/cam.hackerspace.sg;
	include cgi.conf;
	location / {
		add_header Access-Control-Allow-Origin "*";
		if ($http_accept !~* "webp") {
			rewrite ^/(.*\.webp)$ /webp2jpg.php?f=$1 last; break;
		}
	}
}

webp2jpg.php

About

Praze is a simple HTML image viewer where you can cycle through the pictures with cursors or clicking by the image.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published