{"action":"created","issue":{"url":"https://api.github.com/repos/jkphl/svg-sprite/issues/79","labels_url":"https://api.github.com/repos/jkphl/svg-sprite/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/jkphl/svg-sprite/issues/79/comments","events_url":"https://api.github.com/repos/jkphl/svg-sprite/issues/79/events","html_url":"https://github.com/jkphl/svg-sprite/issues/79","id":72053753,"number":79,"title":"Absolute image URL from Sass file.","user":{"login":"cmalven","id":610118,"avatar_url":"https://avatars.githubusercontent.com/u/610118?v=3","gravatar_id":"","url":"https://api.github.com/users/cmalven","html_url":"https://github.com/cmalven","followers_url":"https://api.github.com/users/cmalven/followers","following_url":"https://api.github.com/users/cmalven/following{/other_user}","gists_url":"https://api.github.com/users/cmalven/gists{/gist_id}","starred_url":"https://api.github.com/users/cmalven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmalven/subscriptions","organizations_url":"https://api.github.com/users/cmalven/orgs","repos_url":"https://api.github.com/users/cmalven/repos","events_url":"https://api.github.com/users/cmalven/events{/privacy}","received_events_url":"https://api.github.com/users/cmalven/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jkphl/svg-sprite/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"jkphl","id":4446936,"avatar_url":"https://avatars.githubusercontent.com/u/4446936?v=3","gravatar_id":"","url":"https://api.github.com/users/jkphl","html_url":"https://github.com/jkphl","followers_url":"https://api.github.com/users/jkphl/followers","following_url":"https://api.github.com/users/jkphl/following{/other_user}","gists_url":"https://api.github.com/users/jkphl/gists{/gist_id}","starred_url":"https://api.github.com/users/jkphl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkphl/subscriptions","organizations_url":"https://api.github.com/users/jkphl/orgs","repos_url":"https://api.github.com/users/jkphl/repos","events_url":"https://api.github.com/users/jkphl/events{/privacy}","received_events_url":"https://api.github.com/users/jkphl/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-04-30T03:45:00Z","updated_at":"2015-12-01T09:31:20Z","closed_at":"2015-05-06T02:07:09Z","body":"I'm using the following config to output the `sprite.scss` file to my sass folder and the `sprite.css.svg` file to my public images folder.\r\n\r\n```\r\n  var config = {\r\n    mode: {\r\n      css: {\r\n        dest: 'public',\r\n        sprite: 'img/sprites/sprite.css.svg',\r\n        render: {\r\n          scss: {\r\n            'dest': '../' + paths.styleSrc + '/global/_sprites.scss'\r\n          }\r\n        }\r\n      }\r\n    }\r\n  };\r\n```\r\n\r\nUnfortunately, it doesn't seem like there is any way to specify a destination for the `sprite.css.svg` uniquely from the `url()` that gets output for it in `sprite.scss`, so I end up with the following:\r\n\r\n```scss\r\n%svg-common {\r\n\tbackground: url(img/sprites/sprite.css-493b5432.svg) no-repeat;\r\n}\r\n```\r\n\r\nBecause that is a relative URL, there is no relationship between those two files and the image can not be found. If I could just add a `/` to the beginning of that URL it would be absolute, and correct, and everything would work.\r\n\r\nI can not include `/public` in the image URL because `/public` is the web root of the project.\r\n\r\nIdeas for a possible workaround here?"},"comment":{"url":"https://api.github.com/repos/jkphl/svg-sprite/issues/comments/160908063","html_url":"https://github.com/jkphl/svg-sprite/issues/79#issuecomment-160908063","issue_url":"https://api.github.com/repos/jkphl/svg-sprite/issues/79","id":160908063,"user":{"login":"jkphl","id":4446936,"avatar_url":"https://avatars.githubusercontent.com/u/4446936?v=3","gravatar_id":"","url":"https://api.github.com/users/jkphl","html_url":"https://github.com/jkphl","followers_url":"https://api.github.com/users/jkphl/followers","following_url":"https://api.github.com/users/jkphl/following{/other_user}","gists_url":"https://api.github.com/users/jkphl/gists{/gist_id}","starred_url":"https://api.github.com/users/jkphl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkphl/subscriptions","organizations_url":"https://api.github.com/users/jkphl/orgs","repos_url":"https://api.github.com/users/jkphl/repos","events_url":"https://api.github.com/users/jkphl/events{/privacy}","received_events_url":"https://api.github.com/users/jkphl/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T09:31:20Z","updated_at":"2015-12-01T09:31:20Z","body":"@binarykitchen For now, I won't implement a builtin method for prepending a `\"/\"` to the sprite URL as the same result can be achieved with each of the following options:\r\n\r\n* Use the proper relative path (as @cmalven did above)\r\n* Use an absolute path altogether\r\n* Override the builtin template(s) and use a customized version to prepend a `\"/\"` to the `url()` values"}}