Image path rewriting