Open the gate.. welcome to this dimension..
So onward we go, solving all the problems that I've wanted to have available for web delivery for, like.. well a long time..
For photographers there's often as much fascination with the camera and technicals (ISOs, f-stops, and the like) as there is with the images.
And if you've owned a lot of camera's (and I have owned a lot of cameras :-P) then what camera was used for an old image is always of interest.
So, pushing on from our previous musing on images I've re-implemented image sizing (it was too slow because of bad logic) and dealt with metadata (exif) extraction. You have two choices here, pre-process everything or extract what you need, as you need, during web page delivery.
Obviously its more efficient to do all the processing pre the content ever reaching the web server.
So roughly, locally, you:
process all original images into derivative sizes (500, 750, 1000, 1500, 2000) on the longest edge
extract exif data
process exif data into summary form (more later)
store exif metadata in json for later use on delivery side
On the web side:
shortcodes allow some sophistication in web side image displays (single image, gallery display, lightbox popup etc.)
having all exif data pre-stored means just pulling it out of the 'database' when required
So you can do something like the following shortcode for a gallery:
{{f:gallery; src:2021-seagulls.jpg,2021-mhd.jpg,2021-bees.jpg,2021-lobster.jpg,2021-mural.jpg,2021-lily.jpg; caption:Seagulls in the rearview, "A man, his horse, and his dog", Beehive
(Penola S.A.), The big lobster
(Kingston S.E.), Mural
(Kingston S.E.), Lily;}}
Which creates a clickable light-boxed image gallery, thus: