Improve image serving. Server cached images from middleware layer after rewrites