using middleware to reply
fix jpg path