Alignment of multiple figures in rows and columns
The [t] option uses the baseline of the first line (same as minipage). You can see the baseline using \leavevmode\rlap{\rule{\textwidth}{1pt}}
. So subfigures using [t] are actually aligned by the bottoms of the images, not the tops. To align the tops you would need \raisebox{-\height}{...}
on every image.
\documentclass[12pt,a4paper,twoside, draft]{article}
\usepackage{graphicx}
\usepackage{subcaption} %to have subfigures available
\begin{document}
\begin{figure}
\centering
\begin{subfigure}[t]{0.49\textwidth}
\raisebox{-\height}{\includegraphics[width=\textwidth]{img1.png}}
\caption{caption of first image}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.49\textwidth}
\raisebox{-\height}{\includegraphics[width=\textwidth]{img2.png}}
\caption{caption of second image\\second line}
\end{subfigure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%second row
\begin{subfigure}[t]{0.49\textwidth}
\raisebox{-\height}{\includegraphics[width=0.49\textwidth]{img3.png}}
\raisebox{-\height}{\includegraphics[width=0.49\textwidth]{img4.png}}%
\vspace{.6ex}
\raisebox{-\height}{\includegraphics[width=0.49\textwidth]{img5.png}}
\raisebox{-\height}{\includegraphics[width=0.49\textwidth]{img6.png}}
\caption{caption of the four small images\\second line\\third line}
\end{subfigure}
\hfill
\begin{subfigure}[t]{0.49\textwidth}
\raisebox{-\height}{\includegraphics[width=\textwidth]{img7.png}}
\caption{caption of last image\\second line}
\end{subfigure}
\caption{caption of main figure}
\end{figure}
\end{document}