Skip to content
Property · FOAF

foaf:depiction explained: how FOAF links any thing to an image of it

Published Formatory editorial team
http://xmlns.com/foaf/0.1/depiction

A depiction of some thing.

The depiction property is a relationship between a thing and an Image that depicts it.

Of all the FOAF terms, foaf:depiction is one of the most widely reused outside personal profiles. It does one thing: it connects a thing to an image that depicts it. The thing can be a person, which was the original use case, but nothing in the vocabulary restricts the subject. Museums use it for objects, gazetteers for places, and linked data sets such as DBpedia use it to attach a picture to almost every entity they describe.

Domain, range and direction

The property’s domain is owl:Thing, so any resource can have a depiction. Its range is foaf:Image. Under RDFS semantics, anything placed in the object position is inferred to be an image, whether or not it has been typed that way. That inference is what makes misuse costly: point foaf:depiction at an HTML gallery page and the page becomes, formally, an image.

The inverse property is foaf:depicts, running from the image to what it shows. A photograph of three people can use foaf:depicts three times. Stating either direction is enough; a reasoner can derive the other.

Depiction, img and thumbnail

Three FOAF properties around images are easily confused:

Property From To Meaning
foaf:depiction any thing foaf:Image an image showing the thing
foaf:img foaf:Person foaf:Image an image that represents the person
foaf:thumbnail foaf:Image foaf:Image a smaller derivative of the image

foaf:img is a sub-property of foaf:depiction. The distinction matters in practice: a staff directory wants the one photo a person chose, not every picture in which they happen to appear. foaf:thumbnail hangs off the image, not off the thing, which keeps derivative files grouped with their master. A client can then choose the thumbnail for a results list and the full image for a detail view.

Describing the image itself

A bare depiction link answers “what does this show?” and nothing else. For collections that care about provenance, the image deserves its own description: format, dimensions, creator, rights statement. Dublin Core fits naturally there. dcterms:format with a media type (see dcterms:FileFormat for the format side), dcterms:creator for the photographer, dcterms:rights or dcterms:license for reuse terms.

One point that catches digitization projects: the image of a painting depicts the painting, and the painting may in turn depict a person. Chaining foaf:depiction through both levels says something true at each step. Linking the person straight to the photograph of the painting skips a level and blurs who made what. Museum data published with CIDOC CRM handles this more formally, but in FOAF the two-step chain is the honest approximation.

Mistakes in published FOAF data

Several patterns recur in data sets crawled from the web:

  1. Thumbnail URLs used as depictions, so the only image available to a consumer is 120 pixels wide.
  2. Image URLs that redirect to an HTML viewer page, which breaks clients expecting image bytes.
  3. Using foaf:depiction for logos. A logo represents an organization; FOAF has foaf:logo for that, which better reflects intent.
  4. Depictions with no alternative text anywhere in the data, leaving any interface built on them inaccessible.

The FOAF specification lists foaf:depiction with the status “testing”. Its use is stable enough that renaming it would break a large share of existing linked data, and the FOAF vocabulary overview explains how those status labels work. For pages about a thing, as opposed to images of it, use foaf:page. To give the depicted thing a human-readable label, foaf:name is the usual choice, as in the lantern example.

Example in RDF

@prefix foaf:    <http://xmlns.com/foaf/0.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .

<https://example.org/id/object/lantern-118>
    foaf:name "Brass ship's lantern" ;
    foaf:depiction <https://example.org/images/lantern-118-front.jpg> ,
                   <https://example.org/images/lantern-118-side.jpg> .

<https://example.org/images/lantern-118-front.jpg> a foaf:Image ;
    dcterms:format "image/jpeg" ;
    foaf:thumbnail <https://example.org/images/lantern-118-front-thumb.jpg> .

Questions about foaf:depiction

What does foaf:depiction mean?

It links a thing to an image that depicts it. The subject can be anything, a person, a building, a museum object, and the object of the statement is understood to be a foaf:Image. A thing can have any number of depictions.

What is the difference between foaf:depiction and foaf:depicts?

They are inverses. foaf:depiction goes from the thing to the image; foaf:depicts goes from the image to the thing. Stating one implies the other, so data publishers usually pick the direction that fits how their records are organized.

How is foaf:img different from foaf:depiction?

foaf:img is a sub-property of foaf:depiction with a narrower meaning: an image that represents a person, typically one they chose for their own profile. Every foaf:img is a depiction, but a crowd photo depicting someone is not their img.

Can the object of foaf:depiction be a web page?

It should not be. The range is foaf:Image, so pointing it at an HTML page means a reasoner will classify that page as an image. For a page about the thing, foaf:page is the correct property.

Does foaf:depiction say who made the image?

No. It only states what the image shows. Credits, rights and dates belong on the image resource itself, using properties such as dcterms:creator, dcterms:rights and dcterms:created. Keeping those statements on the image means they stay attached when the image is reused for another subject.

More from FOAF

All 6 in this group