\documentclass{article}

\usepackage[T2A]{fontenc}
\usepackage[cp1251]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{caption}
\usepackage{floatrow}[2008/09/19]

\usepackage{graphicx}[1999/02/16]
\usepackage{wrapfig}[2003/01/31]

% Подписи и надписи как обычный абзац (пакет caption)
%\captionsetup[figure]{format=plain, justification=justified, labelsep=endash,
%singlelinecheck=false, margin={15mm,0mm}, indention=-15mm}


% Рисунок
%   [1] -- Размер, доля ширины страницы
% {2} -- Название файла без расширения (и Метка одновременно)
%   [3] -- Пояснения к рисунку
% {4} -- Подпись к рисунку
%     Обтекаемый рисунок
%   [5] -- Число строк для обтекания (высота)

\makeatletter
 
\newcommand{\tmp@FotoA}{\relax}
\newcommand{\tmp@FotoB}{\centering}
 
\newcommand{\foto}[2][1.0]{%
\@ifnextchar[{\foto@ii[#1]{#2}}{\foto@ii[#1]{#2}[]}%]
}
\def\foto@ii[#1]#2[#3]#4{%
\@ifnextchar[{\foto@iii[#1]{#2}[#3]{#4}}{\foto@iii[#1]{#2}[#3]{#4}[0]}%]
}
\def\foto@iii[#1]#2[#3]#4[#5]{%
\def\tmpVarFOTO{#5}%
\ifnum\tmpVarFOTO>0
\begin{wrapfigure}[#5]{p}{#1\textwidth}%
\centerline{\includegraphics[width=1\textwidth]{#2}}%
{\centering{\small #3 }%
\caption{#4}%
\label{#2}}%
\end{wrapfigure}%
\else%
\begin{figure}[!h]%
\tmp@FotoA
\centerline{\includegraphics[width=#1\textwidth]{#2}}%
{\tmp@FotoB{\small #3}
\caption{#4}%
\label{#2}}%
\end{figure}
\fi%
}

\makeatother

\begin{document}

Text text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text

\foto
{f01}
[Comments]
{Figure caption}

\clearpage

\foto[0.4]
{f02}
[Comments]
{Figure caption}
[12]

Text text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text

Text text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text
 text text text text text text text text text text text text

\end{document}
