Marfeel detects the images and videos an article has to:
- Display the main image of an article in Compass view
- Compute
Image count
- Compute
Video count
Main image of an article
Marfeel detects the main image of an article following this waterfall process:
- LD+JSON data (For more details visit image - Schema.org Property):
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "NewsArticle", "image": "mainImage.jpg" } </script>
- Microdata
<img itemprop="image" src="https://domain.com/path/to/img.jpg">
- Or from Meta OG types:
<meta property="og:image" content="https://mywebsite.com/images/mainImage.jpg" />
Image count
Marfeel detects the images of an article following this process:
- Count the
<img >
nodes from a cleaned XPath DOM. - If no images detected count the Images in the LD+JSON
{
"@type": "ImageObject",
"url": "mainImage.jpg",
"width": { // Optional
"@type": "QuantitativeValue",
"value": 1000
},
"height": { // Optional
"@type": "QuantitativeValue",
"value": 1000
},
"name": "Image title", // Optional
"author": { // Optional
"@type": "Person",
"name": "Photographer name"
}
}
Video count
Marfeel detects the videos of an article following this process:
- Count the VideoObject in the LD+JSON
- If no videos are found in ld+json the system counts the video nodes from a cleaned XPath DOM.