ComboStrap Page Metadata - Image

About

image is a page metadata that defines an image illustration for a page.

The image is then used as illustration on social cards such as twitter or facebook.

By default, if the image property is not set, the first image in the page is used.

twitter, google and facebook have all differents image specifications, therefore when used in this context, the first image conforming to their specification is used.

Since version 1.12

Definition

The image of a page is searched in this order:

  1. the image property in the frontmatter
  2. the first conforming image of a page if not disabled

Example of a a frontmatter image:

  • Single: One image
{
   "image":":path:beautiful_image.png"
}
  • Set: The same image in differents resolution and ratio. A set can be used in an article.
{
    "image": [
         ":photos:1x1:photo.jpg",
         ":photos:4x3:photo.jpg",
         ":photos:16x9:photo.jpg"
    ]
}

Moving image path in a frontmatter with the move plugin are not yet supported. Therefore if you move an image, you also need to change the value in the frontmatter.

Configuration

disableFirstImageAsPageImage

The disableFirstImageAsPageImage is a configuration that permits to disable the use of the first image of page as the image of a page.

Powered by ComboStrap