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 calculates the number of images in an article by taking the maximum value among the following counts:
- Count the relevant ImageObject in
LD+JSON
, only from image and associatedMedia entity attributes. - Count the image in Microdata
- Count the
<img>
nodes from a cleaned XPath DOM.
{
"@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 calculates the number of videos in an article by taking the maximum value among the following counts:
- Count the relevant VideoObject in
LD+JSON
, only from video and associatedMedia entity attributes. - Count the video in Microdata
- Count the
<video>
nodes from a cleaned XPath DOM.