A truly single-file, no-database, drop-in PHP media gallery.

Overview

Media Hut

When I went looking, in early 2022, the options for a truly single-file, no-database drop-in PHP media gallery were shockingly small.

Well, there was one really great one, but it kind of cheated by pulling in the guts from a CDN. If the CDN goes down, or the developer decides to take their ball and go home, there goes your gallery.

Everything else wanted a database setup, or was just way, way outside the scope of what I wanted: just cleanly serve images, video, audio, pdf and text assets using the filesystem for organization.

Don't overthink the capabilities of this: you won't find tags, comments, or much of anything outside of directories and filenames. I may add optional features, including markdown directory docs, and thumbnail caching, but that's the primary use case. Just show media.

Problems (or "To Do")

  • Clicking on a file just opens it up directly in the browser, instead of something nicer. Not exactly in a hurry to change that, but it's on my mind.

  • Persistent config data would be nice, but since it's currently just a handfulcouple at the moment, you'll survive.

  • This could probably all be implemented better -- the build process, most especially. build.sh is a real shit-show, but it works.

  • Themes?

Give It To Me

I keep a fresh copy in the /build directory of the master build. Literally just copy/paste, edit the config block pointing to a media path (it defaults to /media), and off you go.

Other Features

  • If a directory has an readme.md file, it will be rendered below the directories and media.

  • Will create and serve basic thumbnail images from the .data directory.

Demo

I built this for my secret cave of Max Headroom and V (1983) pop culture worship. Check it out over here: https://media.network47.org.

You might also like...
GifFrameExtractor is a PHP class that separates all the frames (and their duration) of an animated GIF

================================ GifFrameExtractor ================================ GifFrameExtractor is a PHP class that separates all the frames (an

PHP Captcha library
PHP Captcha library

Captcha Installation With composer : { ... "require": { "gregwar/captcha": "1.*" } } Usage You can create a captcha with the Captc

A BPMN 2.0 workflow engine for PHP

Workflower A BPMN 2.0 workflow engine for PHP Workflower is a BPMN 2.0 workflow engine for PHP. Workflower runs business processes using the BPMN 2.0

A Sharex IMG uploader that runs with PHP | Use a hosting site if you're a beginner use 000webhost
A Sharex IMG uploader that runs with PHP | Use a hosting site if you're a beginner use 000webhost

Sharex-Img-Uploader A Sharex IMG uploader that runs with PHP | Use a hosting site if you're a beginner use 000webhost Setting up SXCU In YOUR_DOMAIN_U

A PHP GD + TwitterOAuth demo to dynamically generate Twitter header images and upload them via the API.
A PHP GD + TwitterOAuth demo to dynamically generate Twitter header images and upload them via the API.

A PHP GD + TwitterOAuth demo to dynamically generate Twitter header images and upload them via the API. This enables you to build cool little tricks, like showing your latest followers or sponsors, latest content creted, a qrcode to something, a progress bar for some goal, and whathever you can think of.

php-gd based image templates
php-gd based image templates

gdaisy A highly experimental image templating system based on PHP-GD to dynamically generate image banners and covers. Installation 1. Require erikahe

Instagram with ImageMagick & PHP
Instagram with ImageMagick & PHP

Instagraph - Instagram with ImageMagick & PHP In this repository, I’ll demonstrate you how to create vintage (just like Instagram does) photos effects

Grabs the dominant color or a representative color palette from an image. Uses PHP and GD, Imagick or Gmagick.

Color Thief PHP A PHP class for grabbing the color palette from an image. Uses PHP and GD or Imagick libraries to make it happen. It's a PHP port of t

An easy-to-use PHP QrCode generator with first-party support for Laravel.
An easy-to-use PHP QrCode generator with first-party support for Laravel.

An easy-to-use PHP QrCode generator with first-party support for Laravel.

Comments
  • What are the software minimum requirements?

    What are the software minimum requirements?

    What are the requirements? I'm getting a lot of PHP Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) errors for lines like https://github.com/Fortyseven/MediaHut/blob/912f04fd33038a7212518762fdc318d5f40c5553/build/index.php#L97 and https://github.com/Fortyseven/MediaHut/blob/912f04fd33038a7212518762fdc318d5f40c5553/build/index.php#L307

    I'm trying to use PHP 7.0

    opened by zelmon64 1
  • Better method of generating thumbnails

    Better method of generating thumbnails

    Instead of generating thumbnails when the page is loaded, instead have a separate code path dedicated to generating a thumbnail.

    So like, index.php?thumb=filename.gif, and generate/return inside the <img> tag. This way if a directory doesn't have all it's thumbs created yet, it won't block the browser loading the page itself.

    • This will result in a ton of index.php calls, but this not intended to be a high-performance, slick-ass gallery app, so YOLO.
    enhancement 
    opened by Fortyseven 0
Owner
Toby D
Coder, gamer, complainer.
Toby D
make car gallery with lumen

Lumen PHP Framework Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe d

Daniel 2 Feb 26, 2022
Manage your photos with Piwigo, a full featured open source photo gallery application for the web

Manage your photos with Piwigo, a full featured open source photo gallery application for the web. Star us on Github! More than 200 plugins and themes available. Join us and contribute!

Piwigo 1.8k Apr 14, 2022
Image Cache is a very simple PHP class that accepts an image source and will compress and cache the file, move it to a new directory, and returns the new source for the image.

NO LONGER MAINTAINED!!! Image Cache v. 1.0.0 Image Cache is a very simple PHP class that accepts an image source and will compress and cache the file,

Erik Nielsen 455 Dec 30, 2022
:racehorse: find the size of an image without downloading the whole file. Supports batch requests.

FasterImage FasterImage finds the dimensions or filetype of a remote image file given its uri by fetching as little as needed, based on the excellent

Will Washburn 58 Nov 30, 2022
Auto Image & file upload, resize and crop for Laravel eloquent model using Intervention image

Laravel ImageUp The qcod/laravel-imageup is a trait which gives you auto upload, resize and crop for image feature with tons of customization. Install

QCode.in 708 Dec 22, 2022
PHP Exif Library - library for reading and writing Exif headers in JPEG and TIFF files using PHP.

PEL: PHP Exif Library README file for PEL: PHP Exif Library. A library with support for reading and writing Exif headers in JPEG and TIFF images using

null 264 Dec 4, 2022
PHP Image Manipulation

Intervention Image Intervention Image is a PHP image handling and manipulation library providing an easier and expressive way to create, edit, and com

null 13k Jan 3, 2023
PHP 5.3 Object Oriented image manipulation library

Imagine Tweet about it using the #php_imagine hashtag. Image manipulation library for PHP 5.3 inspired by Python's PIL and other image libraries. Requ

Bulat Shakirzyanov 4.3k Jan 6, 2023
🌄 Perceptual image hashing for PHP

ImageHash A perceptual hash is a fingerprint of a multimedia file derived from various features from its content. Unlike cryptographic hash functions

Jens Segers 1.9k Dec 28, 2022
GifCreator is a PHP class that creates animated GIF from multiple images

================================ GifCreator ================================ GifCreator is a PHP class to create animated GIF from multiple images For

Clément Guillemain 320 Dec 15, 2022