Like I mention in title, how to avoid blank space before images? Appendix is not .epub format, I just use EPUB Packages 3.2 and create .mobi with kindlegen. To see more clearly what I mean (images comes from Kindle Preview 3, but it’s behave the same on my device Kindle Paperwhite 3) take a look:
https://i.imgur.com/A0mIUL4.jpg.
I understand that this happen because image is to large and can’t fit into page, therefore device start new page with image at the top. I know it depends of font size, sometimes smaller font will create enough place for image. In this situation in empty place (where image can't fit), text of next paragraph should be pulled to fulfil entire page.
Seeing it in other perspective: how to force device to always full page with text (text should appear to the last available line in the page), it can mix-up order of HTML marks, pull some paragraph after <figure> mark if necessary. I don’t care if image appear before or after one paragraph, it's no difference, it's close enough. It’s seems that device don’t want of any cost to split <p>. Reader priority is to keep <figure> always appear after to <p> to which it's declared in code.
The empty space is allowed only if it’s end of chapter, no more text is available, turning page will reveal new chapter.
So far I tested:
Solution 1 (used in chapter1.xaml): Put <figure> inside <p> mark.
Solution 2 (used in chapter2.xaml): Tread <figure> separate, write it outside <p>.
Solution 3 (used in chapter3.xaml): Remove <p> whatsoever, leave only <figure> (this will create new problem with text)
The only solution I came up it's just do not intertwine <p> with <figure>. Keep <figure> at the end of chapter. I don't want to do that.