# Varying height of 1 figure in two figure side by side in lates

I used the following code to generate two figures in LaTeX. The height of 1 figure is slightly less than the other. how can I vary the height to match?

Figueres is in .png and of the same size but in the manuscript, they have different heights

\begin{figure}[ht]
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=\textwidth]{filename1}
\caption{default}
\label{fig:figure1}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=\textwidth]{filename2}
\caption{default}
\label{fig:figure2}
\end{minipage}
\end{figure}

• Welcome to the TeX.SE! If your images are really of the same size, as you claim in question, than they should have the same height. Since we haven't your pictures, we can reproduce your problem. Please show us result of your code fragment. With use of the example-image-a and example-image-b in your fragment, both images have the same height. – Zarko Jun 11 at 11:35
• Try putting \fbox{..} around the images to show their actual sizes (\fboxsep=0pt). – John Kormylo Jun 11 at 15:29

## 1 Answer

Can you not just set the height explicitly? For example...

\includegraphics[height=8cm]{filename1}


Do that to both images, and they will be scaled to your desired height.