Can't display an image uploaded in the panel

Hello,

I can’t display the image I’ve uploaded in the panel. It seems that I missed something concerning the way to call an image in the template. I think it is linked to a misunderstanding of the difference between the image object ($image) and the image method (image()).

The image is correctly uploaded but it’s not displayed on the site :

Here is my blueprint :

columns:
    - width: 1/3
        sections:
            content:
                type: fields
                fields:
                    title:
                        type: text
                    bio:
                        label: Biographie
                        type: textarea
                    image:
                        label: Photo de profil
                        type: files
                        max: 1
                        layout: cards
                        image:
                            cover: true
                            ratio: 1/1

Here is my php :

            <?php if($image = $page->cover()->toFile()): ?>
            <div id="conteneur-photo">
                <img src="<?= $image->url() ?>" alt="">
            </div>
            <?php endif ?>

In my text file, I’ve got that line :

Image:

- dali.jpg

My cover image is another one and I don’t know how to configure it.

 <?php if($image = $page->content()->image()->toFile()): ?>

Because image() is a native Kirby page method…

Hi @texnixe, thks a lot.