[Tex/LaTex] Problem with wrapfig and itemize

enumitemfloatswrapfigure

If I use an image with wrapfig into or near an itemized list, the result is the image overlapped to the text (see picture).
I red a lot of posts related to wrapfig and itemize incompatibility but no one solved the problem 😉
Any help?

\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{lipsum}

\begin{document}

This is an example: first paragraph is OK but the second have the problem!

\begin{itemize}
  \item 
    \parbox[t]{\dimexpr\textwidth-\leftmargin}{%
      \vspace{-2.5mm}
      \begin{wrapfigure}{r}{0.5\textwidth}
        \centering
        \includegraphics[width=\linewidth]{beach.png}
        \caption{The beach}
      \end{wrapfigure}
      \lipsum[1]
    }
  \item
    \parbox[t]{\dimexpr\textwidth-\leftmargin}{%
      \vspace{-2.5mm}
      \begin{wrapfigure}{r}{0.5\textwidth}
        \centering
        \includegraphics[width=\linewidth]{beach.png}
        \caption{The beach}
      \end{wrapfigure}
      This is a short text...
    }
  \item \lipsum[1]
  \end{itemize}

\end{document}

Resulting image

Best Answer

Using wrapfig in lists is explicitly unsupported, but if you want to do it anyway it works if you help it a bit:

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[demo]{graphicx}
\usepackage{wrapfig}
\usepackage{lipsum}

\begin{document}

This is an example: first paragraph is OK but the second have the problem!

\begin{itemize}
  \item 
    \parbox[t]{\dimexpr\textwidth-\leftmargin}{%
      \vspace{-2.5mm}
      \begin{wrapfigure}[10]{r}{0.5\textwidth}
        \centering
        \vspace{-\baselineskip}
        \includegraphics[width=\linewidth]{beach.png}
        \caption{The beach}
      \end{wrapfigure}
      \lipsum[1]
    }
  \item
    \parbox[t]{\dimexpr\textwidth-\leftmargin}{%
      \vspace{-2.5mm}
      \begin{wrapfigure}{r}{0.5\textwidth}
        \centering
        \vspace{-\baselineskip}
        \includegraphics[width=\linewidth]{beach.png}
        \caption{The beach}
      \end{wrapfigure}
      This is a short text...
    }
  \item     \parbox[t]{\dimexpr\textwidth-\leftmargin}{%
      \vspace{-2.5mm}
      \begin{wrapfigure}[8]{r}{0.5\textwidth}
      \end{wrapfigure}
\lipsum[1]}
  \end{itemize}

\end{document}
Related Question