Following this answer (Background image for minipage) I have issue to show background image, the example below does not show any trace of the image, how can I fix it.
\documentclass{article}
\usepackage{graphicx,tikz}
\usepackage{lipsum}
\usepackage[style=0]{mdframed}
\makeatletter
\newrobustcmd*\mdf@backgroundimage{%
\rlap{\hspace*{0.5\mdfboundingboxwidth}%
\makebox[0pt][c]{%
\tikz[remember picture]%
\node (0,0) [opacity=0.4] {%
\includegraphics[width=\mdfboundingboxwidth,%
height=\mdfboundingboxheight,%
keepaspectratio]%
{example-image}%
};
}%
}%
}
\appto\md@frame@background@single\mdf@backgroundimage%
\appto\md@frame@background@first\mdf@backgroundimage%
\appto\md@frame@background@middle\mdf@backgroundimage%
\appto\md@frame@background@second\mdf@backgroundimage%
\makeatother
\begin{document}
Some text before
\begin{mdframed}
\lipsum[1-2]
\end{mdframed}
Some text behind
\end{document}


mdframedis from 2013 according to the manual. Perhaps you should switch totcolorbox– Jul 29 '17 at 20:09tcolorbox, by all means.) – cfr Aug 13 '17 at 00:32