This is a great tool for WordPress sites – it’s a plugin that lets you search appropriately-licensed images on flickr and easily drop them into a post, complete with the appopriate attribution. This makes the whole process of searching for images and including them in your posts much quicker and more convenient.
Site validation problem
My only problem has been that the first time I used it, my site would no longer validate at http://validator.w3.org. This appears to be because the plugin produces code which doesn’t quite conform with the default WordPress document type (XHTML 1.0 Transitional). Specifically, when I added an image using Photo Dropper the plugin included the attribute align=”absmiddle” for the little CC icon. W3 didn’t like that – but when I changed it to align=”middle” it validated without a problem. Since search engine bots (eg Google) may penalize you for having unvalidated pages, I decided it was wise to fix this.
A simple fix
I’ll never remember to edit the HTML and change this attribute every time I use the plugin to add an image to a post. But it’s very easy to tweak the code to fix this:
- In the wp-content/plugins/photo_dropper directory, edit the file called flickr-js.php
- Change line 62 (but see note 1 below) so that the align attribute is now middle rather than absmiddle.
- Save the file and check that everything looks okay. You might like to use the validator to be on the safe side.
Note 1: As of 3 April 2008, a new version (1.0.5) is available from the Photo Dropper site. The code that needs changing is now at line 96, not 62.
Here’s an image added using Photo Dropper. You can see that changing this attribute does make the tiny CC icon look slightly off-centre, but I prefer this to the validation problem.
Note 2: A cleaner fix might be to remove the CC image and replace it with text (eg the © symbol). See the photo below…