This is the code:

```
\documentclass{article}
\usepackage{graphics}
\usepackage{xstring}
\begin{document}
\newcommand\abs[1]{\IfBeginWith{#1}{/}{#1}{images/#1}}
\includegraphics{\abs{/tmp/photo.jpg}}
\end{document}

```

Doesn't compile. Just hangs up.