All Collections
Author Help
I'm having problems trying to float images. What can I do?
I'm having problems trying to float images. What can I do?

Keywords: float, floating, images

Leanpub Support avatar
Written by Leanpub Support
Updated over a week ago

Sometimes authors report that they have trouble floating images using, the float instruction.

Frankly, our best advice about floating images and wrapping text is to save your time
and not do it :)

Floating images occasionally do work nicely, but more often than not they leave something to be desired. If you are in our help center, chances are this is one of those times!

Basically, it really only works decently for small images (about the size, say, of the circle face in your image), and not in conjunction with anything but normal paragraphs.

Our PDF rendering is done with LaTeX, which is great, but it's really old and it's not good at the types of layouts you see in magazines. It is, however, good at the types of minimalist layouts you see in books :)

Finally, for the people who read your book in EPUB on a phone, they will not care about, or benefit from, any work spent floating images.

Anyway, if you are trying to float images, some of the problems that occur are that a second image might appear on the wrong page, or images might even appear in the wrong order.

One solution to this is to put scene breaks in between the sections of image and text.

We know this is not ideal, but it does let you float images.

A scene break is done with three asterisks *** on a line by themselves, with a blank line above and below, like this:


***

Here is an example of how this would look in Markua:

# About the Authors

{float: left}
![](about-the-authors/jane.png)

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam hendrerit nisi sed sollicitudin pellentesque. Nunc posuere purus rhoncus pulvinar aliquam. Ut aliquet tristique nisl vitae volutpat. Nulla aliquet porttitor venenatis. Donec a dui et dui fringilla consectetur id nec massa. Aliquam erat volutpat. Sed ut dui ut lacus dictum fermentum vel tincidunt neque. Sed sed lacinia lectus. Duis sit amet sodales felis. Duis nunc eros, mattis at dui ac, convallis semper risus. In adipiscing ultrices tellus, in suscipit massa vehicula eu.

***

{float: left}
![](images/about-the-authors/john.png)

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam hendrerit nisi sed sollicitudin pellentesque. Nunc posuere purus rhoncus pulvinar aliquam. Ut aliquet tristique nisl vitae volutpat. Nulla aliquet porttitor venenatis. Donec a dui et dui fringilla consectetur id nec massa. Aliquam erat volutpat. Sed ut dui ut lacus dictum fermentum vel tincidunt neque. Sed sed lacinia lectus. Duis sit amet sodales felis. Duis nunc eros, mattis at dui ac, convallis semper risus. In adipiscing ultrices tellus, in suscipit massa vehicula eu.

***

Did this answer your question?