User Tools

Site Tools


powerful_images

This is an old revision of the document!


Powerful Images

I wanted a fuss-free way to share a directory of images. Kinda like what I would've done on Tumblr, once upon a time, but even easier.

At the moment it shows a randomised group of three whenever the page is loaded.

https://www.ryliejamesthomas.net/powerfulimages/

I was going to add and render a little bit of metadata stored in separate files, but haven't bothered, and don't know if I still will.

The first-draft was more like a blog, was sorted by file name and had multiple pages.

This one's very simple bit of PHP:

<?php
$images_all = glob("images/*.*");
$images_picked = array_rand(array_flip($images_all), 3);
foreach ($images_picked as $image) { 
	echo '<img src="' . $image . '">';
} 
?>
powerful_images.1745128920.txt.gz · Last modified: 2025/04/20 16:02 by rjt