2

Like many sites, we deliver a lot of imagery on our web site.

Use case: set up labels/refinements in Google Custom Search that aggregate and filter two different classes of image objects. Using Schema.org Microdata markup is very easy and works great, but we want the user to select either

1) PHOTOS: a "photo" is taken by with an instrument -- some kind of camera/lens "machine" that comprises something from "real life"

OR

2) ART: all other images that are creative works by an illustrator/artist: vector art, scans of drawings, scans of paintings, water colors etc.

I can easily determine which is which as our web CMS gets metadata from the database, and drives the content through the pipe and fork dynamic insertion of metadata. Something like

<section class="page-content" role="main" itemprop="image" itemscope itemtype="http://schema.org/ImageObject">

    <meta itemprop="image" content="Red Roses" />  #art

and toggle to this if it were a photo

   "itemprop="photo" content="Daffodils" # photo

But this is really not doing the job. I would expect to have some property like "imageType" that I could then apply like this

   itemprop="imageType" content="photo"
   itemprop="imageType" content="art"

But I don't see anything that meets this requirement in Schema.org (my eyes are bleeding from reviewing the hierarchy and still can't find what I need). There is nothing to designate "art" as such.

Any ideas?

Makoto
  • 104,088
  • 27
  • 192
  • 230
Nathsevak
  • 105
  • 1
  • 1
  • 7
  • Update regarding [option *b)* in my answer](http://stackoverflow.com/a/28271694/1591669): [`VisualArtwork`](http://schema.org/VisualArtwork) + [`artform`](http://schema.org/artform) are now live. – unor Feb 05 '15 at 10:26

2 Answers2

1

I don’t know which features Google Custom Search supports, but you have the following options with Schema.org and Microdata.

Unless you have to implement it right now, I recommend option b).

a) Propose new Schema.org types/properties

See my answer to another question for links.

b) Wait for an appropriate Schema.org type/property

The next Schema.org release will contain the type VisualArtwork (draft):

A work of art that is primarily visual in character.

It has an artform property (draft) that takes text or an URL as value:

e.g. Painting, Drawing, Sculpture, Print, Photograph, Assemblage, Collage, etc.

Caution notice: these are drafts, subject to change!

Update: VisualArtwork and artform got released.

<div itemscope itemtype="http://schema.org/VisualArtwork">
  <meta itemprop="artform" content="Painting">
</div>

<div itemscope itemtype="http://schema.org/VisualArtwork">
  <meta itemprop="artform" content="Photo">
</div>

c) Use Schema.org’s extension mechanism

The "slash-based" extension mechanism is "outdated", but valid.

<div itemscope itemtype="http://schema.org/ImageObject/Photo"></div>
<div itemscope itemtype="http://schema.org/ImageObject/Art"></div>

I would only use this as a last resort.

d) Use an additional Schema.org type

This does not work for most cases, but it’s possible in your case: Both of your images are ImageObject, and only the photos are Photograph in addition.

The itemtype attribute can have several values as long as they are from the same vocabulary. But note that you could only use properties that are defined for all of the used types.

<div itemscope itemtype="http://schema.org/ImageObject">
  <!-- art -->
</div>

<div itemscope itemtype="http://schema.org/ImageObject http://schema.org/Photograph">
  <!-- photo -->
</div>

e) Use a type/property from a different vocabulary

If you know/find a vocabulary about your subject/model, you can use the corresponding types as value for Schema.org’s additionalType property:

<section itemscope itemtype="http://schema.org/ImageObject">
  <link itemprop="additionalType" href="http://example.com/vocabulary/photo">
</section>

<section itemscope itemtype="http://schema.org/ImageObject">
  <link itemprop="additionalType" href="http://example.com/vocabulary/art">
</section>

If you find a suitable property, you may use its URL as value for itemprop:

<section itemscope itemtype="http://schema.org/ImageObject">
  <meta itemprop="http://example.com/vocabulary/imageType" content="photo">
</section>

<section itemscope itemtype="http://schema.org/ImageObject">
  <meta itemprop="http://example.com/vocabulary/imageType" content="art">
</section>

f) Use your own proprietary property

If you don’t find a suitable vocabulary, you can use your own URL as property:

[…] a proprietary item property name (i.e. one used by the author for private purposes, not defined in a public specification)

(Example like the second one in b).)

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
0

@unor

My developer told me (talking to him after I posted this) we can use (to avoid adding another meta line to the document):

<section itemscope itemtype="http://schema.org/ImageObject"> # for art
<section itemscope itemtype="http://schema.org/Photo"> # for photography

From tests I see that Google will actually parse this: its structured data previewer show it is being extracted. (though it's structured data preview may throw an error). As such I could use it in a custom search refinement/label.

But, it seems wrong to me from the schema.org standard -- since both classes of

images:(photos),(paintings,drawings,vector)

are all "ImageObjects"

Nathsevak
  • 105
  • 1
  • 1
  • 7
  • The type `Photo` does not exist; you probably mean [`Photograph`](http://schema.org/Photograph). -- While it’s not *wrong* to make this difference, it’s not ideal. Both images should be `ImageObject`, and if it’s a photograph, it should have the `Photograph` type *in addition*: either via `additionalType`, or as [additional itemtype](http://stackoverflow.com/a/21969655/1591669) (if you only use properties both types allow): `
    `
    – unor Feb 03 '15 at 15:44