In another part of this site I keep an online diary, and an important part of that is a simple, captioned photo feed of things I see that inspire me.
I implemented this originally using Google photos – I’d move a photo to a specific album, add a caption and the web page would be automatically updated. A nice workflow that enabled me to accumulate 600+ images over two years.
All very nice, until it wasn’t. Turns out that Google is an unreliable platform to depend upon (who knew?). They deprecated the API I was using and my photo feed went entirely offline on 1 April.
So, I did what I should have done all along – host the images on my own site. This was easier said that done though – I had 600+ captions and dates as well as the images that needed preserving.
It turns out that Google’s “Takeout” function is designed to make it as difficult as possible to take something out. They do provide the meta data for each image, but not in a format that makes it easy to link with the image. If you have edited the photo, or it has a long name, the file name is truncated in a way that makes simple matching impossible.
Anyway, after a few wrestling sessions, and an awful lot of help from DeepSeek AI, I managed to get all the photos, dates and captions migrated into the wordpress media library.
Enabling innovation
I created a basic display, which mirrors the output I had before when I used the Phototonic plugin. Unfortunately that plugin doesn’t dynamically pick up new tagged items in the media library, so I deleted it and wrote a custom php function instead.
It’s a little bit laggy during the infinite scroll, but usable for now. But now I’m excited to build new ways to display the images, now that the assets are completely within my control.
For example, the Photonic plugin didn’t pull in the date from google photos, only the caption. But now I have access to the date, I am playing with an idea to display a nicely formatted date overlay on each picture.
This presented another problem – on google the date was accurate because it was the date the photo was taken. However, I might not load up photos on the day they were taken, and wordpress does not allow dates of media to be edited.
So, I wrote another small php function which added an edit date box to the media library, so I can manually alter dates to reflect the day they were taken.
New photo RSS feed
I’m super excited about another new feature I added this morning – a captioned photo RSS feed for my site.
This feed consists of the latest snapshot content, plus captioned photos inside my diary pages. People can subscribe to this feed on the following address:
https://diary.uncountable.uk/feed/photos
This is something that was impossible before when they were hosted on Google. It’s also not an out the box feature on WordPress, but with the help of AI again, I had the php code generated within minutes.
I have 1500+ photos in wordpress now, which added to at the rate of about 10 a week. I feel there’s a lot more I can do with displaying these in interesting ways.
Just shows the power of taking back control. Should have done it a long time ago.