I’m expanding on a post I wrote a week or two ago in which I added automatic Flickr attribution to header images on the blog theme I’m working on. I wanted it to be done on all images on the blog, and I finally got the script after playing around and with some help from StackOverflow. Here’s the skinny:
I didn’t expand my original script – I want that one to run on its own because it styles the credit a little bit different than the body text. Rather than overlaying a credit, which would require some HTML restructure, I’m simply adding it below the picture because KISS is always the best policy.
A couple things to note about the script:
- Right now, it only adds a credited caption to Flickr photos, because, let’s be honest: they have the best API for this kind of thing. Don’t hope for anything like this on Instagram any time soon.
- It specifically looks for the Flickr URL before running the script, so your site won’t be bogged down with scripts running.
So, there it is. Take it as it is, or take it, mess with it, and share it back.
Also note I’ve got a larger project going which will get its very own post someday soon coming up.