ImageView with URL as source not displaying

This is such a simple thing, that I must be missing something obvious.

I have an ImageView on my webpage that has a value for the URL property. The value is set to a logo image that is located in an S3 bucket.
When editing the UI in Xojo the image shows up and previews just fine, but when running the application the image doesn’t display. If I refresh the page it flickers on screen for a second, then goes away. What am I missing here? Any thoughts?

In digging a bit deeper and looking at the page source it appears that the image is being set to 1x1px, even though I have the size set to 218x98.

Oh I remember this bug. I don’t have any details for you, but I believe it got fixed?
What version of the IDE are you using?

2016 Release 4.1

I can’t find the thread where the issue was discussed, or a Feedback report.
However, I recall reading about it…

As a workaround could you use a WebHTMLViewer and fill it with <img src="//s3.amazonws.com/bucket/myimage.jpg" /> ?

Tim,
Thanks for the replies. I actually already used the HTMLViewer as described above. The ImageView was just one of those things driving me crazy. haha

Thanks again!

[quote=320268:@Michael Wakeland]This is such a simple thing, that I must be missing something obvious.

I have an ImageView on my webpage that has a value for the URL property. The value is set to a logo image that is located in an S3 bucket.
When editing the UI in Xojo the image shows up and previews just fine, but when running the application the image doesn’t display. If I refresh the page it flickers on screen for a second, then goes away. What am I missing here? Any thoughts?

In digging a bit deeper and looking at the page source it appears that the image is being set to 1x1px, even though I have the size set to 218x98.[/quote]
Broken in r4 and 4.1, seems to be fixed in 2017r1.

Greg,
Thanks for the update on this. Is there an ETA on 2017r1?

Public Sub FixImage(extends IV as WebImageView) IV.ExecuteJavaScript("document.getElementById('"+IV.controlId+"').getElementsByTagName('img')[0].style.width = '"+str(IV.width)+"px';") IV.ExecuteJavaScript("document.getElementById('"+IV.controlId+"').getElementsByTagName('img')[0].style.height = '"+str(IV.height)+"px';") IV.ExecuteJavaScript("document.getElementById('"+IV.controlId+"').getElementsByTagName('img')[0].style.left = '0px';") IV.ExecuteJavaScript("document.getElementById('"+IV.controlId+"').getElementsByTagName('img')[0].style.top = '0px';") End Sub

ImageView1.FixImage

The way it is done, it should not break when the bug is fixed.

Thanks Michel. That worked!