[Tex/LaTex] Problem with minipages’ images overlapping

graphicsminipage

I am trying to place two images next to each other and I use minipages for that. I create two minipages and when I compile it the one image overlaps with the other. Shouldn't be the one next to the other by default without any overlapping and with no need to add horizontal space in the first place and do so only if I wanted to make them even more apart? Why is that happening and how can I fix it?

The code I used is

\begin{minipage}[t]{2cm}

\includegraphics[scale=0.45]{A1.JPG}

\end{minipage}
\begin{minipage}[b]{2cm}

\includegraphics[scale=0.45]{A11.JPG}

\end{minipage}

Best Answer

The problem is probably that your images are wider than the minipage. The images can be made exactly as wide as the minipages with \includegraphics[width=\textwidth]{A1.JPG}