In the Hugo PaperMod wiki, the process for adding a cover image to your posts is outlined. Below is the relevant frontmatter structure, taken directly from the wiki:

cover:
  image: "<image path/url>"
  # You can also use a direct link from an external site
  # Example: https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png
  alt: "<alt text>"
  caption: "<text>"
  relative: false # Use relative path for cover image, particularly in Hugo page bundles

If you’re working with page bundles and your file structure looks like this:

.
├── cover-image.jpg
└── index.md

The frontmatter should be adjusted as follows:

cover:
  image: "cover-image.jpg"
  relative: true

It’s important to set relative: true when using page bundles. If this isn’t set, the <head> of your page will contain an incorrect link, leading to a 404 error, like this:

<meta property="og:image" content="https://deuts.org/cover-image.jpg">

Setting relative: true ensures that the image link is correctly handled within the page bundle, avoiding broken links.