SmartImage: Contextual Images for your Site

What is it?

SmartImage is an easy way to deliver images to your web site or blog.

At its simplest, you just include an image reference or a script, and we will automatically scrape your page and compare it to our catalog of recent news images. We will then pick a best image for you, and serve it back to the page. All of this happens quickly during the first page load. The image will also periodically update as new images arrive. So if you have a blog post about Barack Obama, we can deliver to you the latest image. You can also feed specific queries or names, or indicate the section of text on the page that you want us to use for image matching.

You can use this to bring content to all of the pages in your catalog. For example, try adding it to the template file of your blog.

How Does it Work?

There are two ways to include images. The most flexible way is to include a small script on your page, shown below. The first time your page is viewed, we will scrape the content, and identify a recent photo in the news that is appropriate.

<script type="text/javascript" src="http://labs.daylife.com/simg/jsSmartImage.php"></script>

The photo below will be closely related to Barack Obama, since he is mentioned twice on this page:


You can also specify a query or name instead of having us scrape your page, by supplying a "query" parameter to the script:

<script type="text/javascript" src="http://labs.daylife.com/simg/jsSmartImage.php?query=george+w.+bush"></script>

Which produces the following photo:


If we're having trouble scraping your page, for example pulling in unrelated header or footer material, or link lists, you can specify the part of the page you want us to use for image matching by using HTML comments as shown below:

<html>
<body>
...
<!--daylifeScrapeStart-->
Relevant article body here
<!--daylifeScrapeStop-->
..
</body>
</html>

Another aspect you can control is the width of the image. You can specify any width from 105 pixels to 240. If you go larger than 105 pixels, note that the catalog of images we can serve to you becomes somewhat smaller, depending on licensing. For example, a 240 width photo for John McCain:

<script type="text/javascript" src="http://labs.daylife.com/simg/jsSmartImage.php?query=john+mccain&width=240"></script>

Which produces the following photo:


We also have a much simpler JPEG smart image. You just include http://labs.daylife.com/simg/smartImage.jpg on your page, and we do the rest. This has the advantage of not requiring scripts, and it can go places that scripts can't go. The same query and scrape indicators can be used, however width control is not available. For example:

<img src="http://labs.daylife.com/simg/smartImage.php">

Produces a scrape-based photo of related to Obama:

** PLEASE DESCRIBE THIS IMAGE **

While this one uses a parameter to pull a photo using the query parameter:
<img src="http://labs.daylife.com/simg/smartImage.php?query=george+w.+bush">

** PLEASE DESCRIBE THIS IMAGE **