\documentclass{article}
\usepackage{graphicx}
\usepackage{caption,subcaption}
% \usepackage{ragged2e} % required by `'\captionsetup{justification=RaggedRight}`', but that doesn't move the caption itself.
\begin{document}
\begin{figure}
\centering
\begin{subfigure}{0.4\textwidth}
\includegraphics[width=1.0\textwidth]{example-image-a}
\captionsetup{skip=-12pt}
\caption{}
\label{fig:a}
\end{subfigure}
\begin{subfigure}{0.4\textwidth}
\includegraphics[width=1.0\textwidth]{example-image-b}
\captionsetup{skip=-12pt}
\caption{}
\label{fig:b}
\end{subfigure}
\end{figure}
\end{document}
produces
but I would instead like the subcaption text (a) and (b) to be left-justified within the image.
There are other questions that use the stackengine package, or require manually labeling the figures, and I am looking for an alternative approach.
If there is a better alternative to specifying skip=-12pt, I'd also like to know.
EDIT:
I had tried to set the justification with \captionsetup within the subfigure, but if I place the following line in the preamble
\captionsetup[subfigure]{justification=justified,singlelinecheck=false}
I get a better starting point:



marginis responsible for the caption being left-aligned? – Gus May 30 '21 at 21:00