# Image positioning problems [duplicate]

Possible Duplicate:
Keeping tables/figures close to where they are mentioned

I'm having troubles positioning some images. Some appear where i want them to, others appear right at the end of the document.

\begin{figure}[h]
\centering
\includegraphics[width=0.8\textwidth]{images/cleanity.jpg}\\
\end{figure}


I have a bunch of subheadings and my bibliography after this code, but the image appears after. What am i doing wrong?

-

## marked as duplicate by cmhughes, Ian Thompson, lockstep, egreg, JakeApr 5 '12 at 20:21

This question was marked as an exact duplicate of an existing question.

It may be that your image is actually too big to fit within the text block. Issue \clearpage to flush any existing (backed-up) floats. Also, float placement is not always as simple as specifying [h] for here. See How to influence the position of float environments like figure and table in LaTeX? – Werner Apr 3 '12 at 16:59
using [h] on its own almost always results in the floats going to the end of the document as its main effect is to not allow latex to put the float in the t or p positions, use [htp] unless you have really good reason not to. – David Carlisle Apr 3 '12 at 17:18

Figures float - LaTeX puts them where it thinks best. The [h] directive for "here" is only your suggestion, In this case it won't fit and can't go anywhere else, so LaTeX put it at the end of the document. (See comment below.)