I'm facing an issue while trying to programmatically display an image using dojo. I have tried using both "dijit/Dialog" and "dojox/image/Lightbox". However, when using the Dialog method, instead of displaying the image, some random characters are shown in the dialog box. On the other hand, when using Lightbox, the image is always displayed on the second click.
imageDialog = new Dialog({
title: "my image",
preload: false,
href: "/ajax/fileStreamer"
});
imageDialog.show();
The code above only shows some characters, even if a relative path to the image is provided as input.
When using Lightbox with a relative path, the image displays properly. However, when using an image stream, the image is only displayed after the second click.