Quote:
Originally Posted by shotsky
When you delete a photo from within Sigil, it makes no sense to leave the links to it in the epub.
|
It does if you intend to replace the photo with something else. Sure, in that case you'd use "replace" instead of "delete" (I'm guessing it's possible, I don't use Sigil, so I don't know if there's the option), but there's more than one way to skin a cat.
I would agree that it makes more sense to remove all links to a resource when the resource is deleted, and I would try to add the possibility if I were a developer. But then the problem is how to remove the links. Say you have something like this in the code:
Code:
<p>The landscape was amazing:</p>
<div><img src="landscape.png" alt=""/></div>
<p>it made my <img src="eyes.png" alt="eyes"/> water.</p>
(note the second image is inline.)
Now you remove both images, what should the code look like? Like this?
Code:
<p>The landscape was amazing:</p>
<div></div>
<p>it made my eyes water.</p>
(A program could be smart enough to use the "alt" text when removing the image, but should it remove the empty <div>? What if the "alt" text makes no sense without the image?)
And if anything is not perfect, you are left with no clue of where the image was supposed to be, so cleaning the result is going to be a little hell. It could be more practical to leave all references there, at least you can still search them and remove them with regex if you wish.