Pages

Wednesday 8 April 2015

How to insert pictures to a MOBI file using Notepad++ and Calibre

This post complements the one on Indie-publishing on a Shoestring at: http://stevek1889.blogspot.co.uk/2014/11/indie-publishing-on-shoestring-how-to.html
I had struggled to work out how to do it until I found a YouTube video by a lovely guy called Lindsay Woolcott who describes how to build a website using Notepad ++. It is using these same techniques that you can add images to your MOBI file for producing a professional Kindle file. Lindsay’s video is at:
https://www.youtube.com/watch?v=DOEYk05LrbQ , but I’ll describe here how it’s done for an e-book file – with you keeping control over the layout and formatting.

The first thing to do is set up a new folder in Windows Explorer or whatever you use. Save the HTML file of your book, created using Notepad++ to this new folder. This is what it will look like:


The sub folder within this folder is for the saved MOBI files from Calibre.

This is what I did for my book, Spirit of Old Essex – a compilation of Arthur Morrison work. You save all the images you want to use to this file. You need to name each of them distinctly. I chose essex1, essex2 etc.
The next step is to insert the following instruction into your Notepad++ document at the point you want each image to appear:
<img src="essex1.jpg" width=100% alt="Cunning Murell's cottage" />


Obviously yours will be named “image1.jpg” or “image1.png” or whatever you decide to call them. 
The alt= bit is the description of what the image is. I don't know how important it is to get this right.
Then when you 'save,' the new HTML file magically picks up the images from your folder. I still can’t quite get over how it does this but it is very clever. If you want to vary the image size try experimenting with the percentage shown. Also if you want a space after the image you can add a break: <br/> at the end of the line and it puts in a line of space.
This is what my Notepad++ screenshot looks like with the pictures inserted:



You can also use it to insert little vignettes at the chapter ends, like they had in old books – though, personally, I’d go easy on this sort of thing – it won’t make your writing any better.

No comments: