Encode and pass resources in links