Thank you, the error actually comes from an external library that is trying to calculate width/height of your image, but fails with this useless error.

So your template looks like this?
https://playground.jsreport.net/w/anon/djDV3qYr
If you run it through the API you get that error?