#Why does Typst say ‘expected function, found string’ when using image() inside the box?

2 messages · Page 1 of 1 (latest)

rotund wharf
mighty ravine
#

There is a naming conflict. The “image” is an argument that shadows the actual function you’re trying to call.

You can either change the name of the argument (e.g. to img instead of image), so that image is the function and there is no ambiguity, or, alternatively, if you want the name of the argument to stay the same, just use std.image when you call the function, so that Typst knows what you’re referring to.

Hope this helps.