Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-25-2022, 05:42 AM   #1
justin-b-918
Junior Member
justin-b-918 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2022
Device: none
Question Epub 2.0.1 validator error: "Error while parsing file: element "img" missing required

I have tried six ways from Sunday to fix this.
Running through Calibre doesn't generate the same error.
Running through Sigil doesn't generator the error.
This is converted from a word .docx file with several images in the doc.

I have added alt text to the images withing Word so I wouldn't think the "alt" error wouldn't be an issue.
However the "src" error is beyond me. I know barely anything about epub file formats.

Any geniuses out there that can help an old man out?
Attached Thumbnails
Click image for larger version

Name:	validator errors.png
Views:	233
Size:	63.9 KB
ID:	193456  
justin-b-918 is offline   Reply With Quote
Old 04-25-2022, 06:02 AM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
The src="" is the path to the image and is mandatory.

It would typically look like the following...

PHP Code:
<img alt="Title Page" src="images/title_page.jpg" width="400" height="600"/> 
You would need to check the epub file for the correct location. An epub editor will normally give you a pop-up that lets you select the image and the path is auto-filled.
Karellen is offline   Reply With Quote
Advert
Old 04-25-2022, 06:07 AM   #3
justin-b-918
Junior Member
justin-b-918 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2022
Device: none
Quote:
Originally Posted by Karellen View Post
The src="" is the path to the image and is mandatory.

It would typically look like the following...

PHP Code:
<img alt="Title Page" src="images/title_page.jpg" width="400" height="600"/> 
You would need to check the epub file for the correct location. An epub editor will normally give you a pop-up that lets you select the image and the path is auto-filled.
I've used Calibre and Sigil but I can't find the img source location for editing. I'm not familiar with Epub or editing. I'm just trying to upload a book I wrote and the publisher needs two formats and one is Epub. But their online check keeps kicking out these errors.

Thank you for the help
justin-b-918 is offline   Reply With Quote
Old 04-25-2022, 08:19 AM   #4
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,897
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by justin-b-918 View Post
This is converted from a word .docx file with several images in the doc.

I have added alt text to the images withing Word so I wouldn't think the "alt" error wouldn't be an issue.
However the "src" error is beyond me. I know barely anything about epub file formats.
If the images are not actually embedded in the docx but only displayed via a link (or maybe OLE), then the image isn't available in the epub. Check the properties of the images in MS Word or LO Writer (if using Writer ONLY edit odt, but Save As an extra copy in docx.

Related issue:
If you copy a Word file that hasn't fonts embedded to a different PC that hasn't got those fonts the epub creation software can't embed them. Unlike images, they don't need to be embedded if they are on the PC and recognised by OS (Mac, Linux, Windows).
If you don't request the fonts embedded it may still look OK on a PC viewer if the PC has the fonts, but naturally on Kindle or any epub ereader or app on phone/tablet the fonts will be missing.

An ebook (unlike a PDF or word Doc) can only use internal links to the resources inside it for images. Not all ereaders can even open an external webpage either.
Quoth is offline   Reply With Quote
Old 04-25-2022, 09:33 AM   #5
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,724
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by justin-b-918 View Post
I have tried six ways from Sunday to fix this.
Running through Calibre doesn't generate the same error.
Running through Sigil doesn't generator the error.
Shameless plug: install my EPUBCheck plugin for Sigil or Calibre and check your book with it.
Click on any of the error messages to go to the line that the message refers to, copy it and paste it into your next message.
Doitsu is offline   Reply With Quote
Advert
Old 04-25-2022, 02:22 PM   #6
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,897
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by Doitsu View Post
Shameless plug: install my EPUBCheck plugin for Sigil or Calibre and check your book with it.
Click on any of the error messages to go to the line that the message refers to, copy it and paste it into your next message.
A great plugin!
Quoth is offline   Reply With Quote
Old 04-26-2022, 10:02 AM   #7
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Quoth View Post
A great plugin!
I second this. It will save you much brain-damage, OP.

Hitch
Hitch is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub Error while parsing file: value of attribute "src" is invalid; must be a URI Bowcat ePub 2 10-08-2019 10:46 AM
Error while parsing file "attribute"_span" ksrives Calibre 2 12-13-2018 08:01 PM
"Error while parsing file 'Multiple occurrences of the 'cover-image' property " BKh ePub 11 10-19-2018 01:19 PM
"Error while parsing file 'element "img" not allowed here" shotsfromthebar Editor 3 03-31-2017 03:53 AM
ePub validation error help "attribute border is not declared for element img bmacklin ePub 12 11-06-2015 11:00 AM


All times are GMT -4. The time now is 10:54 AM.


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