Pregunta

He comenzado a usar esquemas de esquema.org en mi código HTML y he preparado una galería de imágenes (fragmento a continuación). Cuando pegué mi código en Herramienta de prueba de datos estructurada de Google, No recibí errores, por lo tanto, asumí que el uso de estos esquemas era apropiado, pero todavía estoy. ¿Lo es?

<figure itemscope itemtype="http://schema.org/ImageGallery">
  <figcaption itemprop="description">The castle through the ages: 1423, 1858, and 1999 respectively.</figcaption>
  <figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
    <figcaption itemprop="caption">Etching. Anonymous, ca. 1423.</figcaption>
    <a href="castle1423.jpeg" itemprop="contentURL"> <img src="castle1423_thumb.jpeg" alt="The castle has one tower, and a tall wall around it." itemprop="thumbnailUrl"> </a> </figure>
  <figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
    <figcaption itemprop="caption">Oil-based paint on canvas. Maria Towle, 1858.</figcaption>
    <a href="castle185.jpeg" itemprop="contentURL"> <img src="castle1858_thumb.jpeg" alt="The castle now has two towers and two walls." itemprop="thumbnailUrl"> </a> </figure>
  <figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
    <figcaption itemprop="caption">Film photograph. Peter Jankle, 1999.</figcaption>
    <a href="castle1999.jpeg" itemprop="contentURL"> <img src="castle1999_thumb.jpeg" alt="The castle lies in ruins, the original tower all that remains in one piece." itemprop="thumbnailUrl"> </a> </figure>
</figure>
¿Fue útil?

Solución

los image propiedad de ImageGallery a) espera una URL, y b) se define como:

URL de una imagen del artículo.

Entonces tu marcado dice: "Mi ImageGallery se puede describir mediante tres imágenes."; Si bien probablemente debería decir:"Mi ImageGallery consta de tres imágenes.".

Así con image Puede especificar una imagen que se pueda usar para representar toda la galería.

Para cada imagen de la galería, probablemente deberías usar el associatedMedia propiedad (Pero no estoy 100% seguro de si obtengo su definición correctamente, "codifica" me confunde aquí).

El marcado para cada ImageObject me parece bien.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top