Thumbnails don't show up in the panel

#1

I want to display the product thumbnails in the panel, similar to Starterkit. However, the thumbnails don’t show up, it shows the :framed_picture: icon instead. The thumbnails render nicely on the front-end.

Here are my blueprints:
site.yml


columns:
  - width: 1/2
    sections:
      products: sections/products
  - width: 1/2
    sections:
      notes: sections/notes

sections/products.yml

type: pages
headline: Products
parent: site.find("products")
size: tiny
info: "{{ page.images.count }} photo(s)"
layout: cards
template: product
empty: No products available
image:
  query: page.thumbnail 
  ratio: 1/1
  cover: true

pages/product.yml

title: Product
icon: 🖼

status:
  draft: true
  listed: true

columns:
  - width: 2/3
    sections:
      content:
        type: fields
        fields:
          title:
            type: text
          description:
            type: textarea
      images:
        type: files
        layout: cards
        template: image
        info: "{{ file.dimensions }}"
        image:
          ratio: 1/1
          cover: true
        min: 1
        size: small
    

  - width: 1/3
    fields:
      thumbnail:
        type: files
        multiple: false
      tags: true

Thanks for your help!

Min

0 Likes

#2

Thats an odd one. Since your thumbs are ok on the front end, seems like the generation went ok. Guessing it not a server issue.

I dont suppose you have an ad blocker installed in your browser? You may have hit a common advert size by pure fluke, and the blocker could be hiding them.

0 Likes

#3

There is no page.thumbnail, should be something like

query: page.image.findBy("name", "cover")

or

query: page.image # get the first image, that's the default anyway

unless you have defined a thumbnail page method somewhere.

1 Like

#4

query: page.image Works like a charm. Thanks a lot!

0 Likes

#5

I change to query: page.image as @texnixe suggested and it works nicely

0 Likes

#6

Smashing :slight_smile: You can actually take that line out completely, since query: page.image is the default, and does not require being explicitly set.

1 Like