I can spot two simple changes that I think will help:
- First off you need to add a a comma before the "jpg" in order to mark the first parameter as an empty string. Otherwise the syntax will read "jpg" as the first parameter and the function won't work.
- Secondly, if you're using a Base64 string you need to set the third parameter - ImageType - to 3 instead of 2.
What you'd end up with is this: ~~Image(,jpg,3,400,400,VARImage)~~
Give that a try and see if it works. :)