Search code examples
faviconschema.org

How to describe a website's favicon using schema.org structured data?


Is there an accepted way to represent information about a website's favicon using https://schema.org? I am using image (to list here some of the icon variations that I generated using realfavicongenerator.net) with https://schema.org/WebSite in the following way:

<script type="application/ld+json"> 
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "url": "http://localhost:4000/",
  "name": "WebSite Name",
  "image":
  [
    "/android-chrome-512x512.png",
    "/android-chrome-192x192.png",
    "/favicon-194x194.png"
  ]
}
</script>

A web search led me to discover the favicon for the schema.org website, but nothing about how to convey information about a website's favicon using schema.org.


Solution

  • Check the description of the logo property of Schema. As in your example, this property has:

    Values expected to be one of these types ImageObject

    However, there is also a difference from your example:

    Used on these types Brand Organization Place Product Service

    You can see that there is no WebSite type as specified in your example.

    Additionally, you can use Google's guide for the logo property. Here you should pay attention to the following Google requirements:

    logo URL

    URL of a logo that is representative of the organization.

    Additional image guidelines:

    The image must be 112x112px, at minimum. The image URL must be crawlable and indexable. The image file format must be supported by Google Images.

    From this info, we can conclude that Google requires a square, although this is not explicitly indicated.

    Like any other image, the logo also needs to be compressed, and given the insignificant visual value, the compression can be maximum, for example, I use a 65% compression level.