I was just wondering how people set up their interior images for Kindle books.
I had started out setting a pixel width for interior images ( <$IMG:name;w=200> ), as I had read somewhere that percentages weren’t supported (Is this correct?).
The problem is that on higher resolution devices the images begin to shrink on the page:
To get around this I have been creating a full-width white background for my images. There is a setting (compile format --> Text Layout 'use 100% width for images wider than x-pts ) that means that now my images are always scaled to 100% width, so they now scale up and down with different devices. Perfect…
However. The only trouble with this is that the white background is now visible when the Kindle is set to Sepia or black:
I think I will have to live with this, as I much prefer that the images scale, but I was just wondering how anybody else had approached this.
Is it there any way to use percentages for images instead of pts or pixels?
Many thanks,
Ian
p.s. When I’m web-developing I use:
width = x%
max-width = xpx
That way an image will always scale up or down until it reaches the maximum desired pixel size. Perfect.
I don’t suppose this is supported in epub or Kindle formats is it?
On this, there is currently no way to add a percentage size, because <$img> tags just get inserted into the text before export using the size tags. However, I have added an extra “ebook” tag for the next update. So, from now on, you could do this:
<$img:ImgName;w=400;ebook=50%>
In this example, the image will appear at 50% the width of the page on ebooks, but be 400pt across for all other formats. If you leave “ebook” out, then ebooks will use the same size as other formats. (“ebook” only works for ePub 3 and KF8, though.)
I would like to ask, however, if the ‘w’ and ‘ebook’ parameters can be preceded by a white space in the string. Having them attached to the name of the image file makes the spelling checker underline them. I see doing it breaks the string.
I would like, but the automatic spelling checker continues to distract me with its red wavy lines. I wouldn’t want to switch it off, because this would make typing errors pass unnoticed.
You’ll have to either turn it off or ignore it. The spelling checker is 3rd party; there’s no way for it to know what’s happening in relation to placeholder tags.