You cannot do this in bulk without some programming.
As @Tom indicated,
.epub files are ZIP files. The extensions of the "file names" in the ZIP files for images are often, but not guaranteed to be '.jpg
or.gif`. But extracting these using:
unzip abc.epub *.jpg *.png *.gif
will have you miss any that have the extension
Because of the practically unlimited range of possible extensions for images referred to in the text of your ebook, they can only reliable be identified by one of the following methods:
- analysing the (HTML) text
- checking the headers of all the files included¹
The analysis being the better tool, as there might be (image) files in a (badly formatted) ebook that are never referenced/displayed². This however requires you to parse the XML/HTML to find the names of the files referenced in the
If your ebooks are programmatically generated, they might include (non-necessary) regularities in the image file naming, so that the above
unzip command does work for your case. If that is so a simple script walking over your ebook library file structure and unzipping every ebook in an 'Images' subdirectory would suffice.
¹ There are only very, very few filenames pre-specified for .
epub. ebooks, so you might as well check all the files.
² I once analysed an
.epub, that looked too large for its contents. For some reason it included parts of the Christian mythology texts, which could not be displayed with a normal reader.