For me, the cure has been to place the images using the conventional method, on an inactive, blank page. Then use the resulting URL(s) to code them into the markdown.
It seems like images used only in markdown are seen as unused over a certain timeframe and get purged from the library.