azure-boards-markdown
azure-boards-markdown copied to clipboard
Images not loading in Chrome
I am seeing the following when trying to display images that are hosted on vsts:
I have input similar to this:
Testing attachment

This happens whether I use the attach image button and select a local file or I upload the file to attachments first, and then find the url for the image and use that.
Though the broken image thumbnail is shown, if I click the thumbnail I get a new tab with the image showing.
If I reference some external publicly available image, the image shows (though in full size).
I am using Chrome 67.0.3396.79. on macOS 10.13.4
Attaching images sort of work in Safari and Firefox:
- Safari doesn't scale the image either
- Firefox shows the image, but as a tiny thumbnail.
Is that still happening for you? I know there were some problems in VSTS itself
Yes, this is still happening - but only in Chrome. It looks like it could be related to what seems to be new security ~bug~ feature called CORB.
When I load a WIT containing the extension and a vsts-hosted image, I see something like the following in the console (I changed the specifics, domain/guid/context):
Cross-Origin Read Blocking (CORB) blocked cross-origin response
https://app.vssps.visualstudio.com/_signin?realm=myDomain.visualstudio.com&reply_to=https%3A%2F%2Fkkpuma.visualstudio.com%2Fworkitemtracking%2Fv1.0%2Fattachfilehandler.ashx%3Ffilenameguid%fdc44eef-016f-458a-ad84-b0a123147da8%26filename%someFile.jpg&redirect=1&context=x6ZrOb60esZsh0cR6QC5CD6LyqhBckSFqESviK9UUTFexJKCLuequmtAylj1IG8Dap114UfnS2fdPreMp8piZw24zql3eY7s8eaVi6sQc1yAjY6uQNBmfwo3lkf1Pwith MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.
I also tried starting Chrome without security features, though. The image still didn't display, but I didn't get the warning.
I just tried having both editors active simultaneously. While the image does not work in the MD-preview, it does show correctly in the default editor; where it is even constrained on max-width.
Okay, thanks for the information.
The difference between the editors is most likely because the MD extension has to be hosted in an iframe while the native editor is not. I'll see if I can figure out something.