Quote:
Originally Posted by watani
How does one get FFF to read in a local image file when the website requires you to use the browser cache to get its current chapter list?
...
|
This is getting well into 'off label' use, as it were. But I'll try to explain.
First, I'm approaching this purely as "I want to insert an image I have into a chapter of a book I will update, and have it remain after update." Since the image as linked in the story isn't available anymore in this case, trying to force it in via browser cache isn't going to work for reasons.
longdesc
FFF uses the 'longdesc' attribute to record the original URL for included images so it can reuse images that appear more than once. Images that failed to download are given 'failedtoload'. 'longdesc' is used because most tools & book readers leave it alone.
On update, FFF looks in chapter text files for images tags and uses the 'longdesc' attribute to index them. So if 'longdesc' isn't present, they don't get indexed and are instead dropped.
Edit book
So, if you open the epub in Calibre's Edit book, you should be able to add your images to the file and manually add / update the <img> tags with appropriate src attributes AND add an longdesc attribute to each with a different value.
For example, I added couple of random pictures to an epub in Edit book (File > Import files into book), then added <img> tags (type/edit
<img src=" and Edit book will offer the images in the epub):
Code:
<img src="images/IMG_0227.JPG" longdesc="IMG_0227.JPG"><br>
<img src="images/IMG_0228.JPG" longdesc="IMG_0228.JPG"><br>
Use the original URL from the story if you want to hunt it down--it really just needs to be unique within the file.
Now, the next time the epub is updated by FFF, those images will be kept--BUT, they will have FFF's image processing applied (such as being reduced in size, converted to jpg depending on settings), and renamed such as ffdl-9.jpg.
No promises
As I said, this is an 'off label' use. I've tried it briefly in a simple case and if it works for you, great. But I'm not going to be surprised if there are cases it doesn't work.
Honestly, expecting FFF to fix images that are
broken in the story is really asking a bit much.