$I->amOnURL('data:text/html, <html><body><img src=https://example.com/image.jpg></body></html>')
will result in:
Wrong URL passes, host and scheme not set
Also tried to post it directly to webdriver, by ExecuteInSelenium but it also failed with other error.
My workaround is to save my custom web page on disk and load it into browser. Probably there is no much Codeception can help here, unless webdriver implementation will get better