We have a flow where a QR code gets generated as a...
# report-bugs
b
We have a flow where a QR code gets generated as a PR comment to hot update a mobile app build to the PR revision. This renders fine on Github, but Graphite seems to not render the image. I assume this is because of domain restrictions?
j
Hi there, could you share the exact QR image URL from the PR comment, in addition to the URL of the Graphite PR itself? That will help us see whether Graphite is skipping the image or whether something is blocking it from loading.
b
This is the markdown:
![QR](<https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=zoya%3A%2F%2Fota%3Fchannel%3Dpr-2777>)
j
Thanks for the markdown. It looks like GitHub is more flexible and allows this image endpoint, rather than requiring a normal image-file URL (
.jpeg
,
.png
, etc.), which Graphite currently needs to avoid skipping it. Using the QR image URL that ends with an image extension, or uploading the generated QR image somewhere that gives you a direct `.png`/`.jpg` URL before adding it to the PR comment should work.
b
Github actually renders the HTML as:
Copy code
<a
  target="_blank"
  rel="noopener noreferrer nofollow"
  href="<https://camo.githubusercontent.com/72a5d5165c989dccd3faa4c2c3995e953990972c71b12d7ea028f7a39f1b12bf/68747470733a2f2f6170692e71727365727665722e636f6d2f76312f6372656174652d71722d636f64652f3f73697a653d3330307833303026646174613d7a6f79612533412532462532466f74612533466368616e6e656c25334470722d32373831>"
>
  <img
    src="<https://camo.githubusercontent.com/72a5d5165c989dccd3faa4c2c3995e953990972c71b12d7ea028f7a39f1b12bf/68747470733a2f2f6170692e71727365727665722e636f6d2f76312f6372656174652d71722d636f64652f3f73697a653d3330307833303026646174613d7a6f79612533412532462532466f74612533466368616e6e656c25334470722d32373831>"
    alt="QR"
    data-canonical-src="<https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=zoya%3A%2F%2Fota%3Fchannel%3Dpr-2781>"
    style="max-width: 100%"
  />
</a>
It seems like they upload their own copy implicitly. Any way you’d be able to pull that reference?
j
It looks like GitHub creates that
<http://camo.githubusercontent.com|camo.githubusercontent.com>
URL as part of its own rendered HTML, and Graphite currently renders PR comments from the original markdown body instead of using GitHub's rendered HTML. The only workaround is to upload the generated QR image, or use a direct image URL whose path ends in
.png
,
.jpg
, etc. In the meantime, we'll record this as a product gap to match GitHub's behavior for extensionless image endpoints.