---
layout: post
title: 'Flickr Exports in Jekyll'
categories:
- Web3
tags:
- Flickr
- Jekyll
- Textile
- IPFS
- Web3
comments: true
excerpt: "I'm exporting my photos off of Flickr ahead of their limits for free accounts. This is an initial experiment of the export files, and how to display them in Jekyll."
---
The deadline for deletions of photos from free Flickr accounts is early February[^flickrdates], so I've requested the backup of my account[^flickrrequiem].
The two "Account Data" files are 13MB and 5MB each, and are filled with ```photo_#########.json``` files -- one for each photo.
![](/images/flickr_account_export.png)
The photo and video zip files vary in size from ~300MB to ~1GB. I figure that's about ~23GB of photos, total.
My intent is to self-host these photos. Ideally the photos themselves will be have "permanent" addresses on IPFS -- but I'll still want to display them, and ideally with the original Flickr metadata. This will involve an IPFS to web gateway so I can just include the images directly. The folks from [Textile](https://www.textile.photos/) already have a bunch of IPFS tools specifically for photos that I'll be looking into[^textile]. Plus [Cloudflare is running an IPFS gateway](https://blog.cloudflare.com/distributed-web-gateway/) that may come in useful.
Seeing as the metadata has individual JSON files, I figured I'd take advantage of the Jekyll ```_data``` folder feature: any JSON files placed in that special folder are transformed into a special ```site.data.path.to.file``` variable.
I made a folder ```_data/flickr``` and can put the photo JSON files in there, and then loop through ```site.data.flickr``` to access them all.
For now, I'm just going to experiment with dropping a couple of JSON files in there, and manually uploading the related original photos to the Jekyll site as well. From my old Nokia N80 (and Shozu[^shozu]!) the files are ~1.6MB, and from my Canon S5, ~5MB.
[^shozu]: Shozu was an auto photo uploader for early smartphones that [Roland](http://rolandtanglao.com/) and I and many other Nokia phone geeks used.
You can view the [Flickr page](/flickr/) to see the output. Not very exciting, but I'll pull some more photos, perhaps some with lots of comments, and see where I get to.
Among many other issues around dealing with ~14 years of photos, Jekyll doesn't (natively) support paginating data files. This obviously isn't a final solution in any way.
For now, I'm backing up the Flickr zip archives in my Google Drive account, and will be writing more about what I see as an ideal path to getting these photos permanently into Web3, plus a Web2 front end.
Get in touch if you're interested in this as well!
---
Here's the very simple code for [my Flickr page](/flickr/):
```liquid
{% raw %}
{% for photo_hash in site.data.flickr %}
{% comment %}
{% endcomment %}
{% assign photo = photo_hash[1] %}
{% if photo.privacy == "public" %}