ReCirq icon indicating copy to clipboard operation
ReCirq copied to clipboard

Image not displaying correctly in Lattice Gauge ReCirq

Open eliottrosenberg opened this issue 6 months ago • 4 comments

The image below the text "controls the coupling between electric charges" does not display on the webpage, although it does display on github.

Image

eliottrosenberg avatar Jun 04 '25 03:06 eliottrosenberg

@dstrain115 @mhucka maybe you can take a look at this. Thanks!

Thanks @snichet for noticing this!

eliottrosenberg avatar Jun 04 '25 03:06 eliottrosenberg

Maybe @mhucka knows what is happening, but I would probably try moving this image to a permanent link in an images directory rather than inline bytes within the colab.

dstrain115 avatar Jun 04 '25 16:06 dstrain115

Thanks for filing the ticket. I've assigned it to myself and will investigate.

mhucka avatar Jun 05 '25 18:06 mhucka

Update: it turns out that there is a total of 3 images that are broken in the same way on that page. (The very first image on the page is one such.)

Interestingly, all of the images in this notebook are actually inline data inside the .ipynb file (which is actually a JSON file). They're all "image/png" byte sequences. What's different about the 3 failures is they were pasted into Markdown cells, and this makes the cell structure different internally. While the result is handled properly by other Jupyter Notebook parsers, the system that converts Jupyter notebooks to HTML for the Google websites doesn't seem to work the same way.

It's probably easiest to do what @dstrain115 suggests: create a subdirectory, copy the images into it as separate files, then refer to them using the Markdown image syntax.

@snichet it looks like you may have been the author of this notebook. Would you be able to make those changes, and do a pull request to update the ReCirq repository?

mhucka avatar Jun 27 '25 23:06 mhucka