# How to add a png icon on the right side of a tcolorbox title?

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 :)

-
An image can be loaded by \includegraphics. You can use this command as any other character. –  Marco Daniel Jul 2 '13 at 15:30
Please remove the edit and ask a new question. It's very hard to change an answer after every editing. –  Marco Daniel Jul 5 '13 at 15:31

The package tcolorbox provides the option overlay and some other friends. A simple solution for your left part can be:

\documentclass{article}
\usepackage{graphicx}
\usepackage[most]{tcolorbox}

\newtcolorbox{lattention}{breakable,enhanced,arc=0mm,colback=gray!5,colframe=gray,leftrule=12mm,%
overlay={\node[anchor=north west,outer sep=2pt] at (frame.north west) {\includegraphics[width=8mm]{attention}}; }}

\usepackage{lipsum}
\begin{document}
\begin{lattention}
\lipsum[2]
\end{lattention}

\begin{lattention}
\lipsum
\end{lattention}
\end{document}


Of course you need the picture attention. After this the result will be: