GoodRelationsImages

From Wiki of the E-Business and Web Science Research Group
Jump to: navigation, search
gr_banner_small.png
GoodRelations is a standardized vocabulary for product, price, and company data that can be embedded into existing static and dynamic Web pages.

Project Main Page
Vocabulary
Documentation
Developer's Wiki
GoodRelations Cookbook

Adding Images to Offers and Products

Very often, we want to attach images to offers (instances of gr:Offering) or products or services, which can be instances of

The standard way of doing so is using the foaf:depiction and foaf:thumbnail properties. The advantage is that many Semantic Web and LOD tools can automatically display such images.

Note that Yahoo SearchMonkey recommends the media:image property for attaching images, which is a proprietary Yahoo element.
(Definition from 1: An image of something. Use this property to relate a document to an Image object embedded in it or in general to relate an object to an image representation of that object.). Also, rdfs:seeAlso can be used.

If you want to be on the safe side, use all three.

Example in RDFa:

<xml>

     99.99
     USD
     1.0
             Hepp Computertechnik Personal SCSI Controller
             Fast 16-Bit SCSI Controller for PCs
             
                 <img src="product.jpg"/>
             

</xml>


Note 1:

Note 2:


Example 1 in RDF/XML (just foaf:depiction and foaf:thumbnail):

<xml> <gr:ProductOrServicesSomeInstancesPlaceholder rdf:about="http://www.stalsoft.com/dip/bookmashup/books/0387485309">

  <foaf:page rdf:resource="http://www.amazon.com/Semantic-Web-Real-World-Applications-Industry/dp/0387485309"/>
  <rdfs:label>The Semantic Web: Real-World Applications from Industry (Semantic Web and Beyond)</rdfs:label>
  <rdfs:comment>The Semantic Web: Real-World Applications from Industry (Semantic Web and Beyond)</rdfs:comment>
  <foaf:depiction rdf:resource="51EOLmd5yQL.jpg"/>
  <foaf:thumbnail rdf:resource="51EOLmd5yQL._SL75_.jpg"/>

</gr:ProductOrServicesSomeInstancesPlaceholder> </xml>


Example 2 in RDF/XML (including media:image):

<xml> <gr:ProductOrServicesSomeInstancesPlaceholder rdf:about="http://www.stalsoft.com/dip/bookmashup/books/0387485309">

  <foaf:page rdf:resource="http://www.amazon.com/Semantic-Web-Real-World-Applications-Industry/dp/0387485309"/>
  <rdfs:label>The Semantic Web: Real-World Applications from Industry (Semantic Web and Beyond)</rdfs:label>
  <rdfs:comment>The Semantic Web: Real-World Applications from Industry (Semantic Web and Beyond)</rdfs:comment>
  <foaf:depiction rdf:resource="51EOLmd5yQL.jpg"/>
  <media:image rdf:resource="51EOLmd5yQL.jpg"/>
  <foaf:thumbnail rdf:resource="51EOLmd5yQL._SL75_.jpg"/>
  <rdfs:seeAlso rdf:resource="51EOLmd5yQL._SL75_.jpg"/>

</gr:ProductOrServicesSomeInstancesPlaceholder> </xml>