ComboStrap Page Metadata - Image

About

image is a page metadata that defines an illustrative image for the page.

The image:

The image should be relevant to the page. For example, if you define an image for a news article, the image must be relevant to that news article.

Definition

The image of a page is searched in this order:

  1. the first conform image property in the frontmatter
  2. the first conform image of a page if not disabled
  3. the first conform logo

For a social image (twitter, google and facebook) have all differents image specifications, if the images found in a step is not conform (low resolution, bad type), the next step is taken.

Example

Example of a a frontmatter image:

  • Set: multiple images. The recommended images are:
    • high-resolution (minimum of 300,000 pixels when multiplying width and height, to avoid blurry, unclear images)
    • with the following aspect ratios: 16×9, 4×3, and 1×1 (to avoid cropping)
{
    "image": [
         ":photos:1x1:photo.jpg",
         ":photos:4x3:photo.jpg",
         ":photos:16x9:photo.jpg"
    ]
}
  • Single: You can also define a single image.
{
   "image":":path:beautiful_image.png"
}

Moving image path with the move plugin will update 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