[Tex/LaTex] Subtitle for figure (subfloat)

floatssubfloats

how to add a subtitle to my figure which consists of two separate figures? I want the subtitle to be under each of the two figures.
many thanks for your help in advance!

\begin{figure}[ht]
 \caption{XX}
 \centering
    \subfloat[XXX1]{\includegraphics[width=0.5\textwidth]{Figure1a.jpg}\label{fig:f1}}
  \hfill
  \subfloat[XXX2]{\includegraphics[width=0.5\textwidth]{Figure1b.jpg}\label{fig:f2}}
\end{figure}

Best Answer

Like this?

enter image description here

it is obtained by use of package stackengine:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{stackengine}% for put note about sorce below image
\usepackage{graphicx}
\usepackage[font=small]{caption}
\usepackage{url}
\usepackage{tabularx}

\begin{document}
    \begin{figure}[hb]
    \centering
\def\stackalignment{r}
\begin{tabularx}{\hsize}{*2{>{\centering\arraybackslash}X}}
\caption{Left figure}
\label{fig:left}
\stackunder{\includegraphics[width=\linewidth]{example-image-a}}%
           {\scriptsize%
            Source: \url{http://tex.stackexchange.com/}}
    &
\caption{Right figure}
\label{fig:right}
\stackunder{\includegraphics[width=\linewidth]{example-image-b}}%
           {\scriptsize%
            Source: \url{http://tex.stackexchange.com/}}
\end{tabularx}
    \end{figure}
\end{document}

Or with use of package \copyrightbox:

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}

\usepackage[font=small]{caption}
\usepackage{copyrightbox}
\usepackage{url}

\usepackage{tabularx}

\begin{document}
    \begin{figure}[hb]
    \centering
\begin{tabularx}{\hsize}{*2{>{\centering\arraybackslash}X}}
\caption{Left figure}
\label{fig:left}
\copyrightbox[b]{\includegraphics[width=\linewidth]{example-image-a}}%
           {Source: \url{http://tex.stackexchange.com/}}
    &
\caption{Right figure}
\label{fig:right}
\copyrightbox[b]{\includegraphics[width=\linewidth]{example-image-b}}%
           {Source: \url{http://tex.stackexchange.com/}}
\end{tabularx}
    \end{figure}

\end{document}

Addedndum: in case that image has two sub-figures. With use of \copyrightbox[b]{...}{...} and option position=top for subfig package:

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}

\usepackage[font=small]{caption}
\usepackage{copyrightbox}
\usepackage{url}

\usepackage[position=top]{subfig}

\begin{document}
    \begin{figure}[hb]
    \centering
    \caption{Figure caption}
\subfloat[Left sub-figure   \label{fig:left}]{
\copyrightbox[b]{\includegraphics[width=0.45\linewidth]{example-image-a}}%
           {Source: \url{http://tex.stackexchange.com/}}
}                        
\hfil
\subfloat[Right sub-figure  \label{fig:right}]{
\copyrightbox[b]{\includegraphics[width=0.45\linewidth]{example-image-b}}%
           {Source: \url{http://tex.stackexchange.com/}}
}
    \end{figure}
\end{document}

Addedndum (2): it seems that package \copyrightbox not enable to center text with source information below the image. Use of stackengine haven't this limitation. An example with it and option position=top for subfig package is below:

enter image description here

The right image has text below image in gray color (for comparison only). MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[table]{xcolor}
\usepackage{graphicx}
\usepackage{stackengine}% for put note about sorce below image
\usepackage[font=small]{caption}
\usepackage[position=top]{subfig}
\usepackage{url}

\begin{document}
    \begin{figure}[hb]
    \centering
\def\stackalignment{c}% <-- define alignment of stack
    \caption{Figure caption}
\subfloat[Left sub-figure   \label{fig:left}]{
\stackunder{\includegraphics[width=0.45\linewidth]{example-image-a}}%
           {\scriptsize%
            Source: \url{http://tex.stackexchange.com/}}
}
\hfil
\subfloat[Right sub-figure  \label{fig:right}]{
\stackunder{\includegraphics[width=0.45\linewidth]{example-image-b}}%
           {\scriptsize\color{gray}% <-- if you prefer to have text in gray
            Source: \url{http://tex.stackexchange.com/}}
}
    \end{figure}
\end{document}