08-07-2017, 11:43 PM | #1 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2017
Location: Phoenix
Device: Kindles
|
Linked Resource Does Not Exist
I'm editing a .azw3 file in calibre. I get the consistent error "The linked resource '../images/00003.png' does not exist".
But, the image does exist and displays in the right hand panel correctly. The file name is correct. I'm a beginner at this. I've converted one file successfully, but this issue has me stumped. I've even copied other areas in the book that display correctly the same image. Nothing works to remove the error. Here's the html: 10 <p class="calibre1"><a id="p26"></a></p> 11 <img src="../images/00003.png"/><p></p> The error points to the beginning of line 10. Any ideas as to the cause of this? |
08-07-2017, 11:51 PM | #2 | |
Well trained by Cats
Posts: 30,365
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
Advert | |
|
08-08-2017, 01:17 AM | #3 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2017
Location: Phoenix
Device: Kindles
|
I'm not seeing it. <p> followed by </p> . Anyway, I copied this from another part of the book that seems to not produce any errors. If I remove both p tags, the error stays the same. Yes, I'm a complete html neophyte, but after looking it up, it still seems OK.
|
08-08-2017, 02:36 AM | #4 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2017
Location: Phoenix
Device: Kindles
|
I've found the issue, but I don't understand why this has changed from the first ebook that I put together. The path to images is: <img src="images/00003.png"/>. I found the answer by using the "Insert image" button.
|
08-08-2017, 06:37 AM | #5 |
Well trained by Cats
Posts: 30,365
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
The image tag pair is supposed to be INSIDE the block level tags (p,div,h# are block level)
|
Advert | |
|
08-08-2017, 06:51 AM | #6 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
If the path was wrong, the image certainly shouldn't have displayed correctly, which you say it did.
|
08-08-2017, 06:52 AM | #7 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
|
08-09-2017, 02:41 AM | #8 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2017
Location: Phoenix
Device: Kindles
|
The whole issue to me is still not clear. The reason now, is because else where in the file I have the image path as: <img alt="Image" src="../images/00004.png"/>.
There is only one image in the file. Now, both paths yield the same result even though they are different. (No errors.) This smells like a bug to me. Or, maybe a feature? |
08-09-2017, 02:58 AM | #9 | |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2017
Location: Phoenix
Device: Kindles
|
Quote:
In playing with this, I notice that the above path is produced when I insert the image into a subfile (part0003.html) which I inserted into the book (post conversion). The path <img alt="Image" src="../images/00004.png"/> was produced when I inserted the same image into a subfile which originated with the initial conversion to .azw3. I have saved the book file, but not re-opened it again after closing the calibre editor. I've noticed that the subfiles names are changed after re-opening. Hm! |
|
08-09-2017, 03:06 AM | #10 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2017
Location: Phoenix
Device: Kindles
|
Well. Sure enough, after saving the book, exiting the editor, and reopening the book for editing, the subfiles have been renamed, as expected. But, all of the image paths now are uniform with "../images/00001.png".
For me the lesson here is to use the calibre button for inserting and fixing images, rather than messing with the html, then let "nature" take it's course. (Mine not to reason why, mine just to do or die.) LOL |
08-09-2017, 04:20 AM | #11 | |
Wizard
Posts: 1,165
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
Quote:
The original code seems to be something like <p class="calibre1"><a id="p26"></a><img src="../images/00003.png"/></p> with maybe something additional between </a> and <img Usually this behavior happen by a S&R where the automatic code error correction add missing start and end tag's to become a valid HTML code. Or because of an accidental CR key stroke while the cursor was at this position in the active code view window. Something like that. |
|
08-09-2017, 04:27 AM | #12 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
The fact that browsers (and book readers) will in reality display images that are not contained within blocks shouldn't be taken as a reason not to put them in blocks. The easiest thing to do is just to surround the image with <div> ... </div> tags. |
|
08-09-2017, 07:28 AM | #13 |
Grand Sorcerer
Posts: 12,600
Karma: 74358024
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Remember that the path you specify is RELATIVE to the location of the HTML file.
If the HTML file is not in a folder / directory / whatever you call it then the image path will be images/00001.png If the HTML file is in a folder then the image path will be ../images/00001.png Sent from my Nexus 7 using Tapatalk |
08-09-2017, 08:44 AM | #14 |
Well trained by Cats
Posts: 30,365
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
08-09-2017, 08:51 AM | #15 | |
Well trained by Cats
Posts: 30,365
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
Tags |
error, image, resource |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Highlighting linked text | Julanna | ePub | 26 | 11-09-2014 04:32 PM |
Linked TOC -- code | GraciousMe | Sigil | 4 | 11-20-2012 03:24 AM |
Linked endnotes in epub | virtual_ink | ePub | 30 | 08-30-2011 04:47 PM |
Book Designer and linked footnotes | Patricia | Workshop | 2 | 12-04-2009 01:02 PM |
How to create linked TOC? | squawker | Sony Reader | 1 | 03-04-2007 08:20 AM |