Removing photos does not remove links to them
When using Reports to identify photos that are not wanted, and then deleting them, the photo disappears off disk, but the link remains in the epub. (For example, some ebooks have a bunch of graphics that are not wanted, and you can easily delete them in the Reports section. But the link stays in the epub.
So, if you run Calibre against the file to convert to another format, it renames all the photos based on how many photos remain in the file - which causes collisions, because the 'old' links have the 'old' names, and Calibre doesn't renumber the links that don't have photos on disk.
The result is that there is a mixture of old photo links to photos that don't exist and a group of new link names that reflect actual files on disk. Thus, you end up with photos being shuffled around.
There are a couple ways to solve this - In Sigil, if a photo is deleted using the reports image delete feature (which is the only one that lets you see the actual photos you might want to delete), when a photo is deleted, any links in the ebook leading to that photo should be deleted along with the photo.
The other solution would be for Calibre to use the provided photo names instead of renumbering them, but that's not likely to happen.
Since Calibre always numbers photos and assigns them from zero to however many photos are present (regardless of whether there are links to photos that don't exist) this collision problem remains.
The workaround is to manually delete all the placeholders in book view - not too bad for a small ebook, but a real pain of there are tons of them.
If I've missed a way to 'clean' those unwanted links out, please let me know.
Thanks,
John
|