02-23-2024, 06:52 AM | #1 |
Swepub
Posts: 23
Karma: 10
Join Date: Dec 2023
Device: iPad
|
EPUB image error
Hi
I get below error message when I run EPUBCHECK, but I cannot find an image called 1.jpg. How do I interpret the error message and find the faulty image? ERROR (OPF-029) at "Version 1 - EPUB-Master Print edition - Hidden Secrets in Lightroom Classic TOC and Covers.epub/OEBPS/image/1.jpg": The file "OEBPS/image/1.jpg" does not appear to match the media type image/jpeg, as specified in the OPF file. WARNING (PKG-022) at "Version 1 - EPUB-Master Print edition - Hidden Secrets in Lightroom Classic TOC and Covers.epub/OEBPS/image/1.jpg": Wrong file extension for image. The image is a "png" file but has the file extension "jpg". Thanks! Thommy |
02-23-2024, 07:36 AM | #2 | |
A Hairy Wizard
Posts: 3,121
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
I would think that someone renamed the file to .jpg when it should be a .png??? Also, as a technique, it is preferable to NOT start filenames with a number - try "img_1" or "cover" or something like that. I don't think epubcheck cares about that, but some of your editing software can be multi-platform and might cause issues with numbers first. In general, I find it easier to have filenames that are descriptive. It's a lot easier to find the correct file when editing. And Welcome to MR!! |
|
Advert | |
|
02-23-2024, 07:53 AM | #3 |
Sigil Developer
Posts: 7,762
Karma: 5446592
Join Date: Nov 2009
Device: many
|
That file is listed in your OPF manifest as having an image/jpg file type but it reality that file should be renamed to 1.png and all links to it need to be updated.
If you are using an epub editor like Calibre or Sigil, this would be trivial to do. If you have to do this manually, then make a copy of the epub and rename that copy to end with .zip (as an epub is a specially constructed a zip container). Then unzip that file. Then look inside the OEBPS folder and inside that the image folder. You should be able to see 1.jpg and should rename it to end with .png and not .jpg. Then back in the OEBPS folder find your OPF file (ends with .opf) and open that file in a text editor to find the reference to 1.jpg and change it to 1.png and replace the image/jpeg with image/png. Finally you must search all of the xhtml/html/htm/svg files to look for '1.jpg' and replace it with '1.png'. Or just use Calibre or Sigil. Edit: And I agree that using better names that 1.jpg or 1.png is a very good idea. But mass renaming files is something best left for epub editing software. Last edited by KevinH; 02-23-2024 at 11:31 AM. Reason: fix many typos |
02-23-2024, 08:33 AM | #4 |
Swepub
Posts: 23
Karma: 10
Join Date: Dec 2023
Device: iPad
|
Thanks for your quick feedback!
I use Adobe Indesign. And the problem is that I don't have any image named 1.jpg I have checked the OPF file and my image library and my Indesign links, nowhere to be found. I agree with your rename suggestion. I will check if it's possible to do a mass rename of my image files (550 images :-)) Thanks for the welcome!! Thommy |
02-23-2024, 08:58 AM | #5 |
Swepub
Posts: 23
Karma: 10
Join Date: Dec 2023
Device: iPad
|
Hi again
I reverted back to my edits done yesterday when it worked - success!! It works fine and gets validated as a "Valid EPUB" in EPUB Checker. Don't know what happened today, but at least I can proceed editing now. Thommy |
Advert | |
|
02-23-2024, 11:37 AM | #6 |
Sigil Developer
Posts: 7,762
Karma: 5446592
Join Date: Nov 2009
Device: many
|
Then where is epubcheck getting its error message from? Did you try actually unzipping a copy of the epub and manually navigating to the images folder. Perhaps you have left spaces in the file name not properly % escaped and the file name is something like "image 1.jpg"?
Alternatively, the 1 could be a placeholder and the real problem file name is something else. Perhaps look for a png file masquerading as a jpeg (you can tell by the file signature bytes at the top of each file). With so many images, is this a fixed layout epub or comic book? |
02-23-2024, 11:56 AM | #7 | |
Grand Sorcerer
Posts: 5,326
Karma: 98809518
Join Date: Apr 2011
Device: pb360
|
Quote:
|
|
02-23-2024, 12:58 PM | #8 |
Sigil Developer
Posts: 7,762
Karma: 5446592
Join Date: Nov 2009
Device: many
|
The epub spec (used to or may still) restrict id attribute values from starting with numbers/digits and since many pieces of software created unique id values in the opf out of file names, it caused problems. So naming files with a starting number was discouraged by many epub authors.
InDesign was infamous for not properly escaping spaces in opf manifest urls as required by the epub and url specs. So I am betting that is the issue here. |
02-23-2024, 01:34 PM | #9 | |
Swepub
Posts: 23
Karma: 10
Join Date: Dec 2023
Device: iPad
|
Quote:
But now it works fine and is validated correctly even though I'm at the same edit as when the error occured. The book is a 300 page book about photo software Adobe Lightroom Classic with screenshots. And it's reflowable. |
|
02-23-2024, 01:50 PM | #10 |
Sigil Developer
Posts: 7,762
Karma: 5446592
Join Date: Nov 2009
Device: many
|
Glad you got it validating.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error message: Invalid image: cannot identify image file <_io.BytesIO object at 0x000 | bkleine | Calibre | 0 | 12-11-2020 04:39 PM |
Image Error in Conversion - doc to epub | TheAlkemyst | Conversion | 2 | 12-17-2019 06:10 PM |
HTML TO epub without image error | bookie12 | ePub | 6 | 04-10-2014 11:02 AM |
Smashwords error report:Please make your cover image the very first page of your EPUB | slicknick001 | ePub | 2 | 01-12-2014 05:03 PM |
epub validation error -- image not reachable | vootie | ePub | 14 | 03-08-2012 10:34 AM |