I want to create a simple figure where images are connected with arrows. Here is what I did:
\begin{tikzpicture}
\node[](A) {\includegraphics[width=0.2\textwidth]{a}};
\node[right=1mm of A](B) {\includegraphics[width=0.2\textwidth]{b}};
\draw[->] (A) to (B);
\end{tikzpicture}

But I want the arrow to start and end right at the images with no space between. How can I do that?

every node/.style={inner sep=0,outer sep=0}to the picture options – percusse Oct 04 '13 at 10:56every node/.style={inner xsep=0pt,outer xsep=0pt}for no sep. See Claudio Fiandrino: https://tex.stackexchange.com/questions/95649/reduce-white-space-around-tikz-picture – PatrickT Nov 29 '18 at 19:36