So, I want to use Smashwords to distribute my epub, but I can’t seem to get it to accept my epub from Scrivener. I have Scrivener 3, for what it’s worth. Has anyone else had this issue, and if so, how did you fix it?
Did you follow the instructions from Smashwords?
smashwords.com/swdirect
It seems like my issue is in the cover.
ERROR OPS/body1.xhtml 10 126 Referenced resource ‘OPS/images/Cover.jpg’ could not be found in the EPUB.
In addition to being in the meta-data, it is also in the front matter—in a text file, since I wasn’t able to compile it as just an image. But I will say that it comes AFTER the generated table of contents. Is that the problem? Or is it something else?
If the ePub is looking for a .jpg file, an image stored in an RTF file won’t help it.
When you say the cover is “in the metadata,” do you mean that you assigned it using the Cover pane of the Compile command?
If you inspect the ePub directly, is the cover in place?
Katherine
Ah, that makes sense, thank you.
Yes, that’s what I meant!
The cover becomes the icon for the file itself, and it shows up on my iBooks bookshelf. It doesn’t seem to be in the file when I open it, however, the way it is with .mobi files.
Whether the cover is displayed as though it were a “page” in a book is up to the reading device or software. Some will, some won’t. In general I’d say it’s not a good idea to try and fake it with a copy of the image as an actual section of the book. For one thing it’ll bloat the size of your ePub for something most people won’t see anyway (at least I never scroll all the way back when I get a new book, I start reading from the intro or chapter 1), and secondly since some systems do put the official cover image into the page stream, you can end up with two pages of them.
Alright. Do you have any insight on how to put the cover in the file in such a way that it passes EPUBCHECK?
Put the image into the binder somewhere. If it is inside of a file in the Draft folder right now, then drag it out of that file and into the binder to put it there (and maybe give it a nicer name). You can remove that binder item from the Draft folder now. Next, in Compile, click on the icon that looks like a little picture on the right-hand side of the window. That is where you want to set up the official cover image (used in library thumbnails, etc.).
Here is the documentation in the user manual PDF: §23.4.5, Cover Options.
Ah, I did already have the cover there, pardon the confusion. It was when that didn’t work that I tried putting the image in the file. Still getting the error message regardless.
Okay! Well looking at the error message again, it would be hard to say with just that. You’ll need to take a look at the “body1.xhtml” file that it refers to, and see what is going on in that file that is referring to a “Cover.jpg” file. Sigil or Calibre are both good tools for opening an .epub file and taking a look at their internal component files. But you can also check the box in the General Options tab of the compiler to export source files, which will export all of the ingredients that going into the .epub.
I can say generally that Scrivener tends not to capitalise the image name, it uses “cover.jpg” for the official cover file, and secondarily that it numbers the xhtml files “from zero”, where the first section will be “body.xhtml”, meaning “body1.xhtml” is probably whatever the second section is. In a simple text for example, that might be chapter two, as the contents page has its own filename. But like I say, it should be much easier to tell what is going on by actually looking at the file itself and searching for the “Cover.jpg” reference within it.
Thank you! I will certainly look into that. Upon further investigation, it does seem like it’s my cover file itself that is causing the issue — I tried making an epub with another image in my binder and that passed the initial check. So I’m not sure what’s going on there. I’ll have to mess with it some more.
I really appreciate all your help!
Yeah, it seems like something got a little weird at some point. Let us know what you find it if you can, it could be useful for helping others.
I’ll let you know if I figure it out. Right now I feel like I’m going in circles. I noticed that the validator worked when I used imported screencaps, so as a last ditch effort I screencapped my cover and imported it into my scrivener file, tried to do it that way… didn’t work. Maybe smashwords just hates my cover specifically? LOL.
So, after much screaming, I do think that I got this to work. I screencapped the cover image while it was rather small, and that seemed to work? So maybe it was the size of the image that was the issue… I’m not sure. I’ll keep making sure the file is good, but at least it’s a start?
OKAY. I also realized that my title page front matter had a faulty $img command in it. That was what was giving me all of the trouble! How it picked which images it played nicely with and which ones it didn’t is beyond me… but, you know, it doesn’t matter anymore lol.
Ah, I see! It looks like the case matters, so if you have a reference to <$img:Cover> but the file is actually “cover.jpg” in the ePub itself, the image is technically missing.