I'm writing a programming book for novices and I'm making some text boxes to focus attention on them, like "Tips", "Warning", "Focus on" and so on. For now I'm using tcolorbox and I'm very happy with it, but I would like to add some small icons on the right (or left) side of the title bar. Another option could be to remove the title bar and add a side bar with the icon. In the manual of tcolorbox I have found several examples, but none of them show how to load images and add on the title bar. Any help would be wery appreciated.
[EDIT]
Here is a minimal example of my code:
\documentclass[10pt]{book}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage[breakable]{tcolorbox}
% ----------------------------------------------------------------
\begin{document}
\begin{tcolorbox}[breakable,arc=0mm,colback=gray!5,colframe=gray,title=Warning!]%
\lipsum[1]
\end{tcolorbox}
\end{document}
% ----------------------------------------------------------------
The code rendered: I would like something like: or even:
Another option could be
\documentclass[10pt]{book}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage[breakable]{tcolorbox}
% ----------------------------------------------------------------
\begin{document}
\begin{tcolorbox}[breakable,arc=0mm,colback=gray!5,colframe=gray,leftrule=12mm]%
\lipsum[1]
\end{tcolorbox}
\end{document}
% ----------------------------------------------------------------
Rendering: And the mokup:
That's all :)
\includegraphics
. You can use this command as any other character.