When you are writing your book in plain text on Leanpub, you may find that the way floating images and text work together is not always working perfectly. In fact, sometimes it doesn't really work at all. This is something we may address in Markua at some point.
Our general policy at Leanpub r.e. floating images is that they aren't really all that well-suited to ebooks that are produced in multiple formats from a single source manuscript, and that are going to be read on a variety of devices, where people can change fonts and font sizes.
We have an InDesign export option for making books look super nice once an author is done writing their book, and we have a "Bring Your Own Book" mode people can use to upload super-nicely formatted files for sale on Leanpub.
If you really want to curate your book with floating images, you can use a little hack to insert blank lines that can clean things up a bit. You can create blank lines by essentially adding single cell tables, by putting two pipes with a space between them | | on a line by themselves.
If you do this:
In between paragraphs and images etc., you might be able to get the floating images to work better.