Use the resource instead of the request path for auto asset helpers. Fixes #1326