Relative image links broken in markdown files when using "New source browser experience"

Issue #15949 resolved
Phil Gates-Idem
created an issue

We have *.md files in our Bitbucket repo that contain images. We typically put the images in an images subdirectory.

For, example:

  • images/logo.png
  • README.md contains ![Logo](images/logo.png)

This older issue discussed the original problem: https://bitbucket.org/site/master/issues/6589/markdown-relative-link-to-image-and-other

The recent broken markdown images are due to a regression when turning on the New source browser experience via setting on Labs page.

Expectation: When rendering markdown, the relative path in an image link should be rewritten so that the web browser loads the raw version of image and not the image viewer HTML page.

Official response

  • Peter Williams staff

    We released a fix over the weekend that we believe addressed this regression. I'm going to close this ticket for now, but if you have additional examples that were working with the old source browser and stopped working after turning on the new experience, please comment here with a link to the example and I'll re-open the ticket while we continue to investigate.

Comments (20)

  1. Peter Williams staff

    We released a fix over the weekend that we believe addressed this regression. I'm going to close this ticket for now, but if you have additional examples that were working with the old source browser and stopped working after turning on the new experience, please comment here with a link to the example and I'll re-open the ticket while we continue to investigate.

  2. Peter Williams staff

    Thanks for sharing that Evin, that's really helpful. When I load that page I see the image 3 times, both when viewing the root directory (in the panel under the directory list) and also when viewing the README.md file individually. The src of the <img> tag is https://bytebucket.org/gaieges/image-demo/raw/206e5f1993d3cf0edf4af86c7afdfdd6496db4de/image.jpg . I checked in Chrome, FF and Safari (haven't had a chance to try IE or Edge yet for that repository).

    Is it possible that your browser is caching an older JS bundle from before our Friday release?

  3. Evin Callahan

    Ahh you're right, it seems to be a cache issue .. after clearing local caches (cmd-shift-R didn't work - need to clear out via devtools) I can see the raw image url being used instead of the other path. Thanks!

  4. Log in to comment