[Tex/LaTex] Alignment of images in \minipage environment

graphicsminipagevertical alignment

I have a problem with \minipage alignment: I want to place two images side by side with a top alignment, so I used this code:

    \begin{figure}[!h]
\begin{minipage}[t]{0.5\linewidth}
  \includegraphics[width=1\linewidth]{...}
  \caption*{}
  \label{}
\end{minipage}
\hfill
\begin{minipage}[t]{0.4\linewidth}
  \includegraphics[width=1\linewidth]{...}
  \caption*{}
  \label{}
\end{minipage}
\end{figure}

Here is the result:

enter image description here

My goal is to obtain this kind of alignment:
enter image description here

Then I have to add other images to the page, in order to obtain this layout:
enter image description here

I googled and tryed many solutions, but no one gave me the desired result.
Thank you in advance.

EDIT: I resolved with the solution proposed by @Jesse, using valign=T instead of valign=T in order to obtain a perfect alignment.
To put the images on the top of the page, I just added \newpage before the images.

Thanks to all.

Best Answer

This is a possible solution, via adjustbox package where valign=t and valing=c can be used.

enter image description here

Code

\documentclass[]{article}
\usepackage[paper size={20cm,10cm}]{geometry}
\usepackage[export]{adjustbox}


\begin{document}

\begin{figure}[!h]
\begin{minipage}[t]{0.5\linewidth}
  \includegraphics[valign=t,width=1\linewidth]{example-image-a}
  \caption*{}
  \label{}
\end{minipage}
\hfill
\begin{minipage}[t]{0.4\linewidth}
  \includegraphics[valign=t,width=1\linewidth]{example-image-a}
  \caption*{}
  \label{}
\end{minipage}
\end{figure}
\end{document}