Search code examples
rr-markdownrstudiopandocquarto

Thumbnail does not display in my Quarto blog


I am building a Quarto Blog, in my post I am adding a image to, it shows in my post but at the homepage it gives a error as a thumbnail:

enter image description here

I tried in different ways to insert the image, all of them gave the same result:

  • Using the visual mode in RStudio
  • Using image: "An intro to chi-squared test.png in the .qmd header
  • Using ![](images/An%20intro%20to%20chi-squared%20test.png) inside my .qmd

After rendering each one, the image shows inside the post but does not as a thumbnail in my home, as shown in the figure above.


Solution

  • I got it! so I removed the image from inside the post but kept the image command in the post .qmd header.

    image: "An intro to chi-squared test.png 
    

    Then in my main index.qmd file I added the following below listing:

      fields: [image, date, title, description, categories,author]
    

    So my header became:

    ---
    title: "Blog"
    about:
      template: jolla
      image-width: 70%
    listing:
      contents: posts
      fields: [image, date, title, description, categories,author]
      sort: "date desc"
      type: default
      categories: true
      sort-ui: false
      filter-ui: false
    page-layout: full
    title-block-banner: true
    ---
    

    Now my blog looks like this:

    enter image description here