fix url_to_attachment for production