Be careful when substituting - sometimes the book creator uses png for a specific reason, eg. .png can have transparent backgrounds so the image works with whatever color background the user selects, while jpg does not.
Code:
- you will need to do the conversion from .png to .jpg using your favorite image
software/process and put them in an accessible location/folder
- open the epub file manually:
-- rename the file from yourfilename.epub to yourfilename.zip
-- open the zip file, find the image files and delete
(sometimes they are located in: ../OEBPS/Images/)
-- copy the new/changed images to that folder
-- rename the file back to an .epub extension
- OR -
- you can accomplish this step using Sigil by multi-selecting all the files you
want to delete (ctrl-click or shift-click) in the Book Browser Pane then hitting
the delete key. Then using the "add existing files" button (plus sign on the
toolbar, or Insert/File on the menu, or Ctrl-shift-I) then multi-select all the
images you wish to add then selecting "open"
- Once the images are in your epub use your editor of choice (Sigil or Calibre Editor
are excellent, free, editors) to change the file reference in the html:
-- search for something like: Images/(.*?).png"
-- replace with something like: Images/\1.jpg"
You should definitely do this on a backup copy of your book, and I would recommend iterating through one at a time (
replace/find instead of
replace all).