# Change name for numbered figures

Is there any way to change the numbered figure caption in Lyx? For example, in Section 2 to be 2.1.1 then 2.1.2, etc. but I don't want to write in the caption "Figure 2.1.1. blabla" I want "Fig. 2.1.1 blabla"

Combining the answers to questions: Change figure numbering for appendix and How to change Figure 1: to bold Fig.1. in latex:

\documentclass{article}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{chngcntr}
\captionsetup[figure]{name={Fig.}}
\counterwithin{figure}{section}
\begin{document}
\section{First}
\begin{figure}[ht!]
\centering
\includegraphics[scale=1]{example-image}
\caption{Example figure.}
\label{fig:1}
\end{figure}
\end{document}