diff --git a/src/calibre/ebooks/mobi/reader.py b/src/calibre/ebooks/mobi/reader.py index f0ccc93c9c..c55b94cac5 100644 --- a/src/calibre/ebooks/mobi/reader.py +++ b/src/calibre/ebooks/mobi/reader.py @@ -569,6 +569,10 @@ class MobiReader(object): for attr in self.IMAGE_ATTRS: recindex = attrib.pop(attr, None) or recindex if recindex is not None: + try: + recindex = '%05d'%int(recindex) + except: + pass attrib['src'] = 'images/%s.jpg' % recindex for attr in ('width', 'height'): if attr in attrib: