{"action":"created","issue":{"url":"https://api.github.com/repos/emaphp/underscore-template-loader/issues/18","repository_url":"https://api.github.com/repos/emaphp/underscore-template-loader","labels_url":"https://api.github.com/repos/emaphp/underscore-template-loader/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/emaphp/underscore-template-loader/issues/18/comments","events_url":"https://api.github.com/repos/emaphp/underscore-template-loader/issues/18/events","html_url":"https://github.com/emaphp/underscore-template-loader/issues/18","id":138942138,"number":18,"title":"Dynamic image path loading, vars in image path","user":{"login":"oller","id":1219831,"avatar_url":"https://avatars.githubusercontent.com/u/1219831?v=3","gravatar_id":"","url":"https://api.github.com/users/oller","html_url":"https://github.com/oller","followers_url":"https://api.github.com/users/oller/followers","following_url":"https://api.github.com/users/oller/following{/other_user}","gists_url":"https://api.github.com/users/oller/gists{/gist_id}","starred_url":"https://api.github.com/users/oller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oller/subscriptions","organizations_url":"https://api.github.com/users/oller/orgs","repos_url":"https://api.github.com/users/oller/repos","events_url":"https://api.github.com/users/oller/events{/privacy}","received_events_url":"https://api.github.com/users/oller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-07T10:20:10Z","updated_at":"2016-03-09T14:46:51Z","closed_at":null,"body":"I'm having trouble getting the underscore-template-loader to pick up images with a dynamic path\r\n\r\n```html\r\n<img src=\"/img/cat-<%- currentCat.url %>.png\" class=\"cat-img\">\r\n```\r\n\r\nStatic images are working fine with the following config.\r\n\r\n```js\r\n{\r\n    // Compile templates.  Enables var template = require(\"template.html\")\r\n    test: /\\.html$/,\r\n    loader: \"underscore-template\",\r\n    engine: \"lodash\",\r\n    query: {\r\n        root: config.app\r\n    }\r\n},\r\n```\r\n\r\nAny suggestions on the best way to implement something like this would be appreciated!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/emaphp/underscore-template-loader/issues/comments/194326413","html_url":"https://github.com/emaphp/underscore-template-loader/issues/18#issuecomment-194326413","issue_url":"https://api.github.com/repos/emaphp/underscore-template-loader/issues/18","id":194326413,"user":{"login":"oller","id":1219831,"avatar_url":"https://avatars.githubusercontent.com/u/1219831?v=3","gravatar_id":"","url":"https://api.github.com/users/oller","html_url":"https://github.com/oller","followers_url":"https://api.github.com/users/oller/followers","following_url":"https://api.github.com/users/oller/following{/other_user}","gists_url":"https://api.github.com/users/oller/gists{/gist_id}","starred_url":"https://api.github.com/users/oller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oller/subscriptions","organizations_url":"https://api.github.com/users/oller/orgs","repos_url":"https://api.github.com/users/oller/repos","events_url":"https://api.github.com/users/oller/events{/privacy}","received_events_url":"https://api.github.com/users/oller/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T14:46:51Z","updated_at":"2016-03-09T14:46:51Z","body":"That works like a charm @emaphp.  Thanks again for the prompt effort.\r\n\r\nThe only issue i'm encountering is if the image path is absolute, (starts with a `/`).  That is being transformed to the complete absolute path on my machine:\r\n\r\n```html\r\n<img src=\"/Users/oller/app/img/cat-demographic.png\" width=\"102\" class=\"cat-img\">\r\n```\r\n\r\nOnce I click back and forth to get the dynamic populating of the image path, it works fine, it's just that initial load state.\r\n\r\nAs an aside, any ideas how/if it'd be possible to get this working with some kind of hashing?"}}