Is it possible to call a JavaScript function from the IMG SRC tag to get an image url?
Like this:
You cannot do it inline the image @src, but you should be able to call it from an inline script block immediately following your image: