Image proxy middleware