Image not showing in panel

I have a blueprint for a Products page on which I have a section where I have a list of sub-pages (product categories). I want these displayed in card format but I can’t seem to be able to display an image for these sub-pages. This is my blueprint

title: Products
sections:
    bgimagefields: 
        type: fields
        fields:
            bgimage:
                label: Page Background Image
                type: files
                layout: cards
                max: 1
    pagetaglines:
        type: fields
        fields:
            intro: 
                label: Intro. This will show under the main page image.
                type: textarea
            tagline: 
                label: Tagline. This will show  just above the page footer.
                type: text
            line1:
                type: line
    prodcats:
        type: pages
        create: false
        label: PRODUCT CATEGORIES
        layout: cards
        image:
            query: page.doorcatthumb.toFile()

Solved it. The problem was with the sub-folder ymls.