An unofficial blog that watches Google's attempts to move your operating system online since 2005. Not affiliated with Google.

Send your tips to gostips@gmail.com.

August 14, 2009

A Simple Way to Specify Image Licenses

Google has recently added a Creative Commons filter in Google Image Search, but it didn't explain how to specify the license so that your images are properly identified.

The trick is to enclose the image and the license's link in a div tag and to use RDFa's about attribute to specify the resource. For example:

<div about="image.jpg">
<img src="image.jpg" alt="" />
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution Share-Alike 3.0</a>
</div>


17 comments:

  1. The "about" attribute doesn't seem to validate (not as XHTML strict, not as HTML5), or am I missing something?

    ReplyDelete
  2. www.img4u.com

    Download Wallpapers. Sign Up For Free and you can upload your own wallpapers

    ReplyDelete
  3. wow, I wanted something like this along time ago
    will it be considered anchor if put on another website?

    ReplyDelete
  4. @Philipp Lenssen,
    Perhaps you should try to validate it as XML ?(http://www.w3schools.com/Dom/dom_validate.asp says No errors found when the code snippet was validated.) I guess it is interpreted as XML.

    ReplyDelete
  5. XML is not HTML or XHTML

    ReplyDelete
  6. @Christoph
    You are right, but probably Google is interpreting the code as if it is XML.

    ReplyDelete
  7. Is the new Youtube official yet? I have in in Windows 7 Firefox, Windows 7 Internet Explorer, Windows Vista Firefox, Windows Vista Chrome, and on my mom's Windows Vista Firefox.

    ReplyDelete
  8. So everyone has to download more just to keep the computer happy?

    ReplyDelete
  9. That's a little bulky for my taste. How about something like this:

    <img src="image.jpg" alt="" license="http://creativecommons.org/licenses/by-sa/3.0/" />

    ReplyDelete
  10. Scratch that. You're trying to keep the html valid.

    ReplyDelete
  11. wbowsers is right. Webmasters should not be forced to use invalid HTML or extra divs. Google's example looks more like a way to spread awareness of creative commons to a viewer rather than hidden meta to help out Google search.

    On my site, it wouldn't make sense to add a cc link to every thumbnail or icon. Look at my site. There's just no practical use for Google's example on smaller images. There should also be a header option for image lisense to apply to a whole page than the Webmaster can override inline with wbowser's example.

    ReplyDelete
  12. I meant "that" the Webmaster..

    ReplyDelete
  13. This is really an informative review.
    The videos really seems to have relevant ideas that was shared in making things clear.


    thanks for posting!

    ReplyDelete
  14. Have a look at the RDFa W3C Recommendation for information about how to use RDFa and what to do to make it valid. ;)

    ReplyDelete
  15. You're trying to keep the html valid.

    ReplyDelete
  16. "Google's example looks more like a way to spread awareness of creative commons to a viewer rather than hidden meta to help out Google search."

    I agree! I just want to tag my images as public domain so Google will pick them up as such. Why should I have to give 20 or so links to Creative Commons on each page to do so? It's going to look like a mess!

    ReplyDelete