But I’m expecting it to return http://root.dev/01-parent/02-child/filename.jpg
The toFile() function doesn’t seem to work on the new field. Works fine with a select field or the selector plugin.
It appears to only work for me when the template corresponds to the same level…
The image is /01-parent/02-child/filename.jpg and I can use any of the above methods just fine in child.php template
But if I want to display it for in a list/grid in parent.php template it throws an error Fatal error: Call to a member function url() on null in /Applications/MAMP/h...
I tested this in a starterkit and it works on all levels. Have you made sure that the field contains an image filename in every page? Or better still, use an if statement to check that the field is not empty and the image exists.