Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-01-2026, 03:19 PM   #1
philja
Evangelist
philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!
 
Posts: 420
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Why are some epubs without OEBPS folders?

I have three epub2 's to edit where the owner wants to improve the alt=" " for the images, amongst other changes.

The first thing I noticed was the way the images were coded in the xhtml files:

Code:
<img class="x65" src="Pictures/image1.gif" alt=" "/>
The images all appear conventionally in a folder named 'Images' in the Book Browser, and usually I find images in Code View like this:

Code:
<img class="x65" src="../Images/image1.gif" alt=" "/>
In the other two epubs, instead of 'Pictures', the images have src="images/image1.gif"

When I open most epubs in an archive viewer, there is the usual structure of a META-INF folder, an OEBPS folder, and a mimetype file. Inside the OEBPS folder, we find the Images, Text, Styles ... folders + the content.opf and ncx files.

When I examine these three epubs the same way, there is the META-INF folder, a Pictures (or images) folder (containing all the images), and all the text files are at the same level as the mimetype and content.opf file. There is no OEBPS folder.

They all pass the F7 and epubcheck tests ok.

I'm just curious - the images all display ok. Are these epubs the product of a particular conversion application?

Last edited by philja; 09-01-2026 at 04:27 PM.
philja is offline   Reply With Quote
Old 09-01-2026, 05:46 PM   #2
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: 29,712
Karma: 212474403
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
There is no specification for how epubs need to be structured. As long as the paths/links are valid, things will still work. Some applications have been known to create a completely flat epub structure. Some create other structures. Sigil USED to force its proprietary structure on every epub it opened/saved, but it hasn't done that for a long time. Many people became used to that structure.

The "Restructure to Sigil Norm" tool will restructure the epubs to the folder hierarchy many expect, but it's not at all required.

Last edited by DiapDealer; 09-02-2026 at 08:52 AM.
DiapDealer is online now   Reply With Quote
Old 09-01-2026, 11:46 PM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 54,230
Karma: 182161593
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I still use the Restructure tool but that is due to having gotten used to finding images in Images, etc. Old dogs and an adversion to new tricks.

Actually, there are a few rules for ePub structure. The mimetype file is required, must be in the root of the container and must be stored uncompressed. The container.xml file is required and must be stored in a META-INF directory in the root of the container. There are several other optional xml files (encryption.xml (required if obfuscation/encryption is used), manifest.xml, metadata.xml, rights.xml & signatures.xml). You will also commonly find that Apple and Kobo xml files are stored in the META-INF file though this is not required (com.apple.ibooks.display-options.xml & com.kobobooks.display-options.xml) and can cause an error message if they are also listed in the .opf file.
DNSB is offline   Reply With Quote
Old 09-02-2026, 08:56 AM   #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: 29,712
Karma: 212474403
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Yes. You are correct. I didn't want to get into the particulars about the mimetype and the container.xml. they didn't seem relevant to @philja's question(s). There are no requirements for where the xhtml, css and image files (and even the opf file, so long as the path to it in the container.xml is correct) must live.
DiapDealer is online now   Reply With Quote
Old 09-02-2026, 10:27 AM   #5
philja
Evangelist
philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!philja rocks like Gibraltar!
 
Posts: 420
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Thankyou DiapDealer. I've never used the restructure tool before.

I made a checkpoint for security and then used the restructure to Sigil norms and it seems to have worked fine.

Like DNSB, I like conformity with what I'm familiar with - and it helps some of the regex work 'as is' without needing to revamp them.

Learning everyday
philja is offline   Reply With Quote
Old 09-02-2026, 01:15 PM   #6
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,496
Karma: 21099999
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
I always restructure to Sigil norms for the same reason… except when I forget to… that always causes me issues. I wonder if there is a way to add that as a preferences selection - to auto restructure on open or something???
Turtle91 is offline   Reply With Quote
Old 09-02-2026, 05:51 PM   #7
jugaor
Connoisseur
jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.
 
jugaor's Avatar
 
Posts: 57
Karma: 17648
Join Date: Jun 2011
Location: Lima, Peru
Device: Kindle 10Gen / Kobo Aura HD / Nook STR
Quote:
Originally Posted by Turtle91 View Post
I always restructure to Sigil norms for the same reason… except when I forget to… that always causes me issues. I wonder if there is a way to add that as a preferences selection - to auto restructure on open or something???
I'm in the same boat.
I support this idea, either as a new preference or an option in the ini file.

Last edited by jugaor; 09-02-2026 at 07:58 PM.
jugaor is offline   Reply With Quote
Old Yesterday, 01:57 AM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,982
Karma: 7518950
Join Date: Nov 2009
Device: many
No. We forced that for years but it violated the epub3 spec and will silently break any javascript, and break non-well formed code, etc. So just add it to an Automate List if you still use it frequently.

And fwiw, there is/was nothing special about Sigil's old forced folder structure. And you can use Sigil's tools to create any epub structure if you so desire. But forcing (even optionally) on first load a fixed structure is against spec and as I said can break things and so is a non-starter.

Last edited by KevinH; Yesterday at 07:42 AM.
KevinH is offline   Reply With Quote
Old Yesterday, 08:53 AM   #9
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,496
Karma: 21099999
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
No worries.

Just wondering though - how can restructuring “break things”? Do I need to worry about running the restructure??
Turtle91 is offline   Reply With Quote
Old Yesterday, 09:46 AM   #10
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,982
Karma: 7518950
Join Date: Nov 2009
Device: many
Restructuring can break javascripts because they often assume paths to specific resources they interact with, but Sigil can not walk all javascript code to try to update it any more than they could for any other programming language.

Restructuring to Sigil norms, changes every file's path and therefore changes every relative link and path between them requiring walking every source updating any link or src or href or alt img src, font source in css, etc. So if some links just happen to work on Windows due to case folding, or are broken initially these can never be updated. Also file name collisions may happen from identically named images being moved to sit in the same folder (often an issue with compendium epubs). We try to detect and fix these cases but. I personally would never run it on any not-well formed epub that I had not checked the links first with Reports or epubcheck or ... and never if javascript is present in the original epub.

Last edited by KevinH; Yesterday at 12:54 PM.
KevinH is offline   Reply With Quote
Old Yesterday, 09:54 AM   #11
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,982
Karma: 7518950
Join Date: Nov 2009
Device: many
That said, it is safe to use if all links, hrefs, src, css links, etc are correct and no javascript is used. I still first run epubcheck to help detect any broken links and fix them first, then Restructure to Sigil norm if needed. So its safety really depends on epub correctness first.
KevinH is offline   Reply With Quote
Old Yesterday, 05:39 PM   #12
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,496
Karma: 21099999
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
coolio! Thanks!!
Turtle91 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Likebook Mars - Power Off Image Location? thatguyatdennys Boyue 2 03-05-2019 08:31 PM
Aura Keeping annotations when moving .epubs location MicheleBS Kobo Reader 7 12-28-2017 10:22 AM
Image Not Found jackibar Sigil 2 10-18-2013 10:48 AM
(PW) Location of waterstones screensaver image mrspaceman Kindle Developer's Corner 19 05-09-2013 02:07 AM
Request Location of e-ink image shown when power is off sanketsu enTourage eDGe 20 12-18-2011 05:06 AM


All times are GMT -4. The time now is 07:17 PM.


MobileRead.com is a privately owned, operated and funded community.