I need to add a long image to the side of the document, but the text does not seem to be wrapping around the image.
\documentclass[letterpaper,12pt]{report}
\usepackage{subfigure}
\usepackage{float}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{wrapfig}
\begin{document}
\section{sec1}
\lipsum[1-4]
\subsection{subsec1}
\begin{wrapfigure}{r}{5.5cm}
\label{wrap-fig:1}
% \includegraphics[height=15cm]{sample}
\rule{5cm}{15cm}
\caption{A wrapped figure going nicely inside the text.}
\end{wrapfigure}
\lipsum[5]
\section{sec2}
\lipsum[5-12]
\end{document}
How can I wrap the image properly?

\labelhas to be put either inside the argument of\captionor after\caption(the optimum is inside the argument). – Skillmon Mar 19 '21 at 08:49