iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.82k stars 284 forks source link

Synchronize preview when image is written #594

Open silaswaxter opened 1 year ago

silaswaxter commented 1 year ago

Describe the bug The previewer should update/synchronize when an image within the document is updated. Currently, the previewer only reloads images when restarted or when the web-page is reloaded.

To Reproduce

  1. Create a test folder
  2. Download an image to the folder (eg this one from wikipedia); name it test_image.png.
  3. Create a local markdown file with the following contents:
    
    # test file

The figure to synchronize: the image

4. Launch the markdown previewer
5. Edit the image or replace it. Ensure the image is overwritten while the previewer is active.
6. Observe that the previewed image is unchanged.
7. (Optional) edit text within the document and observe that the previewed document changes.

**Expected behavior**
When the included image is overwritten, the previewed image should be reloaded.

**Desktop (please complete the following information):**
 - OS: Arch Linux

Log:

============================================================================== mkdp: health#mkdp#check

felipejoribeiro commented 8 months ago

Same problem. Tried on both arch linux and MacOS, and with multiple browsers including brave, vimb and qutebrowser.