Custom core image - use local snap file

Hi there,
I’m trying to build an image with an snap which isn’t in the store.
The documentation says that it is possible, so I wrote the filename instead of the snap name in the model.json.
However I get the error cannot find snap "mysnapsname_version_architecture.snap": snap not found.
Can you please help me to find the mistake?
Thank you

For local snaps you have to use the --extra-snaps option in ubuntu-image. point this to the full or relative path of the snap you want added and it will be added to the image as if you would use “snap install --dangerous /path/to/snap” after first boot.

Note that this snap will indeed not be upgadeable, to achieve upgradeability you need to upload the snap to the store and add it to the “required-snaps:” field in your model assetion instead …

Thank you a lot!
The documentation was a bit misleading…