Grid respect an image centered

I think the problem with your code appears because you change the origin and [x={(photo.south east)}, y={(photo.north west)}] doesn't work as expected. But don't trust on me.

As an alternative, following code works:

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}

\begin{frame}{Grid respect image}
    \begin{tikzpicture}[overlay, remember picture]
    \node[outer sep=0pt, inner sep=0pt] (photo) at (current page.center) {\includegraphics[height=6cm]{example-image}};
 \begin{scope}
        \foreach \i in {0,.2,...,1}{
            \draw ($(photo.south west)!\i!(photo.south east)$)--
            ($(photo.north west)!\i!(photo.north east)$);
            \draw ($(photo.south west)!\i!(photo.north west)$)--
            ($(photo.south east)!\i!(photo.north east)$);}
    \end{scope}
    \end{tikzpicture}
\end{frame}

\end{document}

enter image description here


Remove all explicit positioning of image in your MWE and use simple \centering for centering of image and draw grid relative to image:

\documentclass[table]{beamer}
\usepackage{tikz}

\begin{document}
\begin{frame}{Grid respect image}
\centering
    \begin{tikzpicture}[inner sep=0pt]
\node (photo) {\includegraphics[height=6cm]{example-image}};
\draw[line width=0.5mm, color=red] (photo.south west) grid (photo.north east);
    \end{tikzpicture}
\end{frame}
\end{document}

gives:

enter image description here


You forget to shift the origin of your scope:

\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}{Grid respect image}
  \begin{tikzpicture}[overlay, remember picture, shift={(current page.center)}]
    \node (photo) [anchor=center, inner sep=0pt] at (0,0) {\includegraphics[height=6cm]{example-image}};
    \begin{scope}[shift={(photo.south west)},x={(photo.south east)}, y={(photo.north west)}]
      \draw[help lines, step=0.1, line width=0.5mm, color=red] (0.0,0.0) grid (1.0,1.0);
    \end{scope}
  \end{tikzpicture}
\end{frame}
\end{document}

enter image description here