Well, \scalebox
works in center
, but not the other way round; and a center
environment within a figure
environment is usually frowned upon since it introduces unwanted vertical space, see Should I use center or centering for figures and tables?. I propose here a slightly different implementation
\documentclass{article}
\usepackage{graphicx,float}
\newcommand{\figu}[3][]{
\begin{figure}[H] % <--- do you REALLY need/want this?
\centering
\includegraphics[#1]{#2}
\vspace{-0.2cm}% <--- do you REALLY need/want this?
\caption{\hspace{0.25cm}% <--- do you REALLY need/want this?
#3\label{f:#2}}
\end{figure}
}
\begin{document}
\figu[width=\linewidth]{example-image-a}{Caption of one figure}
\figu[scale=.4]{example-image-b}{Caption of another figure}
\end{document}
I find it very strange that you force a 13/8 ratio for all pictures; also the vertical and horizontal spaces you are inserting manually look very suspicious to me.