\documentclass[10pt]{beamer}
% \usetheme[progressbar=frametitle]{metropolis}
\begin{document}
\begin{frame}
\frametitle{Test}
\begin{itemize}[<+->]
\item A
\item B
\item C
\end{itemize}
\only<1>{\hfill\includegraphics[width=0.5\textwidth]{example-image-a}\hfill}%
\only<2>{\hfill\includegraphics[width=0.5\textwidth]{example-image-b}\hfill}%
\end{frame}
\end{document}
How do I center the images when in \only? The second \hfill doesn't seem to have any effect.
I also tried \hfills outside the \only, but that didn't work as well.


