I have created an image block snippet that works correctly, based on the image block that Kirby ships with it.
I then created a new block that creates a select option in the panel allowing the admin to select a team member from a structure field in the site blueprint. This works as expected, until I wish to do the following:
My structure field contains an image. I wish in my team member snippet to get this image and render it, using the already existing block image snippet. I have tried to create a new Block() object to send from one block snippet to the image block snippet, but I am either transferring no content from one to the other, or in the current state, I am getting an error that the format should be yaml.
But the image was not found. I am assuming that because my image belongs to the main content folder (the image is assigned to the site blueprint) and not the page that the block is rendered on, it can’t find the image. Would this assumption be correct?
What does this return? I’d say a field object, but you don’t want the field object, but the uuid of the file. So should be $person->image()->toFile()?->uuid()?->toString()