I'm using a quite satisfying solution for figures with side by side images with subcaption, a solution by which images are sized automatically to same height and to text width, see MWE below.
\documentclass{article}
\usepackage{mwe}
\usepackage{floatrow}
\usepackage{subcaption}
\begin{document}
\blindtext
\begin{figure*}[htb]
\ffigbox{}{\CommonHeightRow{\begin{subfloatrow}[2]% this comment needed, see 1st comment to question
\ffigbox[\FBwidth]{\includegraphics[height=\CommonHeight]{example-image-10x16}}{\caption{A subcaption.}\label{fig:01a}}
\ffigbox[\FBwidth]{\includegraphics[height=\CommonHeight]{example-image-16x10}}{\caption{Another subcaption.}\label{fig:01b}}
\end{subfloatrow}}
\caption{The composite figure caption.}\label{fig:01a+01b}}
\end{figure*}
\blindtext
\end{document}
However sometimes I would like to limit the overall width of the two figures to something less (say 80%) than text width (retaining the uniform height), but I couldn't find a way to achieve it. A very nice solution to a similar problem does not seem to work in this case.
Thanks in advance for any clue.
Solutions using a package other than floatrow are welcomed, as long as they automatically size images height and overall width by a given percentage of text width, as required.
P.S. I just noticed a slight shift of figure to the right, maybe some floatrow package expert can help to fix this too.


\begin{subfloatrow}[2]add a comment character at the end of the line:\begin{subfloatrow}[2]%and the space will be gone. See this for an explanation on spaces at the end of the lines. – Phelype Oleinik May 25 '18 at 19:28