Two questions related to yml

In the yml file I have:

sections:
   image:
     type: files
     template: single-image
     max: 1
     layout: cards

Now I want to add

<img src="<?= $page->image()->url() ?>" alt="Logo">

But how to make only the image from template: signle-image inserted in the src?

One more question

In the yml file I have:

   files:
     images:
       type: files
       layout: cards

Is there an option to show only images and not all files in a folder?

  1. You can get specific template images like following:
$page->images()->template('single-image')->first()->url();
  1. You need to use query option for filtered images in files field:
files:
  images:
    type: files
    layout: cards
    query: model.images.template('single-image')