If you “replace” the file, then the link should stay the same. I just tested this and confirmed with both an image and a PDF.
If you “replace” the file, then the link should stay the same. I just tested this and confirmed with both an image and a PDF.