azure-boards-markdown icon indicating copy to clipboard operation
azure-boards-markdown copied to clipboard

Images not loading in Chrome

Open adamal opened this issue 7 years ago • 4 comments

I am seeing the following when trying to display images that are hosted on vsts:

screen shot 2018-06-11 at 16 38 16

I have input similar to this:

Testing attachment 

![screeenshot](https://myteam.visualstudio.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/_apis/wit/attachments?filenameguid=yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy&filename=screenshot.png)

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.

adamal avatar Jun 11 '18 15:06 adamal

Is that still happening for you? I know there were some problems in VSTS itself

cschleiden avatar Jun 15 '18 00:06 cschleiden

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=x6ZrOb60esZsh0cR6QC5CD6LyqhBckSFqESviK9UUTFexJKCLuequmtAylj1IG8Dap114UfnS2fdPreMp8piZw24zql3eY7s8eaVi6sQc1yAjY6uQNBmfwo3lkf1P with 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.

adamal avatar Jun 17 '18 10:06 adamal

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.

adamal avatar Jun 17 '18 10:06 adamal

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.

cschleiden avatar Jun 18 '18 17:06 cschleiden