答案1
这是我能做的最好的事了。
% boxfigprob.tex SE 593681
\documentclass{article}
\usepackage{framed}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{figure}
\centering
\begin{minipage}{6.75cm}
\begin{framed}
\centering
TITLE \par\medskip
\includegraphics[width=6cm]{example-image-duck}
\caption{A racing duck}
\end{framed}
\end{minipage}
\end{figure}
\end{document}
答案2
\documentclass{article}
\usepackage{graphicx}
% Based on https://tex.stackexchange.com/questions/425122
\begin{document}
\begin{figure}
\lineskip=-\fboxrule
\fbox{\begin{minipage}{\dimexpr \textwidth-2\fboxsep-2\fboxrule}
\centering
\includegraphics{example-image}
\caption{The caption text}
\end{minipage}}
\end{figure}
\end{document}