Can’t reproduce this. Just tried it in V8 and works like a charm, at least without authotization, see https://mydemoversion8-sandbox.mxapps.io button Forum questions, button question 94169, both in normal page and popup.
Tried with security set to Demo/Prototype, also no problem,
Does this error also occur if you set security to none? Try recreating a new entity (spec from system.image)
Probably a bug,
A workaround for a small file:
2) Create a variable with that decoded base64 (
Did you create your own specialization of System.Image? You cannot use System.Image directly but have to create your own entity that is a specialization of System.Image.