\documentclass[../main.tex]{subfiles}

\begin{document}
Here's how to include an image:

\begin{figure}[bh]
    \centering
    \includegraphics[width=4cm]{homotopy}
    \label{fig:img1}
    \caption{Delicious!}
\end{figure}

(The image path is actually set in the main file!)

\end{document}