There have been a lot of changes recently with Flickr, and from February, free users with over 1000 photos are going to start seeing their old photos being deleted. Premium membership has also seen a sharp increase in price.

So, this seems like an opportune moment to move my photos off the platform – I’ve got something going on to 3K photos on there, and while I still have the originals, I’ve nicely sorted them into albums, so it would be a shame to lose that.

Previous attempts at writing an import tool connected over the API, but this broke some time ago when Flickr changed their authentication mechanism, and honestly I’ve not had the time to fix it.

Thankfully, Flickr now offers a full data export via your accounts page. This export contains a bunch of zip files that contain all your media, as well as handy .json dumps of all the image meta data. Using this seemed like a much better way than fighting with Flickr’s API again.

Usage

The new tool is a Known console plugin, so unlike the previous tool, you’ll need to install this to your ConsolePlugins directory.

Next, you need to request and download all your data from Flickr. Do this via your accounts page.

Once you have your .zip files, place them in a directory somewhere, where you can access them from your Known install.

Next, execute your import by running the import code from the console:

Where username-to-import-to is the user who’s stream these photos and videos will appear under, and /path/to/flickr/export is the directory you’ve stuffed your .zip files. 

There is no need to unzip these files ahead of time, the import tool will do that for you.

After you’ve run the import, assuming that there have been no errors, you should see all your photos and videos appearing on your stream!

» Visit the project on Github...

Ok, so earlier I talked a bit about a Flickr photo import script for Known.

Since self-dogfooding is important, I thought I’d point you guys to my new photos site, which uses the data produced by the script’s output.

My script imports all photos, videos and tags, and also stores collections and sets.

Known currently doesn’t have a concept of grouping stuff together (although this might be on the roadmap for the future), so for the time being I’ve stored them as a GenericDataItem object. The site’s custom theme makes use of these to render sets and collections in a sensible way.

Still tweaking, but I’m pretty pleased with the results so far!

I have a number of WordPress sites which use Dan Coulter’s Flickr API powered gallery plugin to render images from an attached Flickr account.

This plugin appears to no longer be maintained by the author, and I have previously written about having to make a couple of code changes in order to get it to work again.

Anyway, a little while ago, I noticed that my Flickr galleries had stopped working again, so here’s a fix.

SSL Redux

Firstly, the Flickr API now REQUIRES that you connect to it via SSL. However, the Flickr gallery code uses the non-ssl endpoints.

So, in phpFlickr.php we need to update the endpoint URLs

If you use the database cache, at this point you’ll need to reset it, since you need to rebuild the cache using the correct URLS.

To do this, open up mysql (or mysqlmyadmin) and open your wordpress database. Next, delete all the rows from the cache, e.g.

Broken Flickr shortcode

Next, it seems that there was a collision with the Flickr shortcode, seems something was already defining the code but was expecting different parameters (likely Jetpack, but I’ve not really investigated).

So, I modified flickr-gallery.php to define the shortcodes in the plugin’s init function, after un-registering the existing definitions, and altered the priority so that it was defined last.

Get the updated plugin on Github…

» Visit the project on Github...