toprule and bottomrule for figures
With use of \rule
:
\documentclass{scrartcl}
\usepackage{graphicx}
\usepackage[skip=1ex]{caption}
\begin{document}
\begin{figure}[ht]
\centering
\rule[0.5ex]{\linewidth}{1pt} % <---
\includegraphics{example-image-duck}
\rule[2ex]{\linewidth}{1pt} % <---
\caption{A figure.}
\end{figure}
\end{document}