View Single Post
Old 07-24-2016, 06:07 PM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,659
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by eschwartz View Post
And, critically, Sigil does not know how to auto-correct url() links in CSS, which it normally does for the HTML links in the rest of the book.
Sure it does. You must have "Mend on Open" enabled, of course. It works for me anyway. I just tested it on an epub I created that used a "pictures" folder instead of "Images." I even added a background image via a css url() link like the one in question that pointed to an image in that "pictures" folder.

When I opened the epub in Sigil for the first time, all links were properly updated (including the css url() link) to reflect the required "Images" folder. When I rename the image file in the Book Browser, the url() link in the css file is also updated to reflect the change.

This is all predicated, of course, on the image(s) being properly manifested in the opf in the first place. If the href in the manifest is incorrect, Sigil can't update the links properly when "normalizing" an epub upon opening -- which is what I'm guessing happened to the OP in the first place, and why the url() link wasn't properly updated. Either that or they really manually typed an url link that cannot exist in Sigil using Sigil. Sigil can't fix what Sigil don't know.

If you want to manually create an url() link to an image file in a css file using Sigil, then it simply HAS to start with '../Images'. Nothing else will work.

Adding url('../01-roman-devon/gold-aureus.jpg') to a css file within Sigil is going to result in broken link every single time. Plain and simple. And nothing is ever going to automatically fix it because there's no matching image in the OPF manifest. There can't be in a Sigil epub.

Last edited by DiapDealer; 07-24-2016 at 06:31 PM.
DiapDealer is offline   Reply With Quote