{"action":"created","issue":{"url":"https://api.github.com/repos/sabof/svg-mode-line-themes/issues/13","labels_url":"https://api.github.com/repos/sabof/svg-mode-line-themes/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/sabof/svg-mode-line-themes/issues/13/comments","events_url":"https://api.github.com/repos/sabof/svg-mode-line-themes/issues/13/events","html_url":"https://github.com/sabof/svg-mode-line-themes/issues/13","id":71234287,"number":13,"title":"Add instructions in README for loading external images","user":{"login":"jasonm23","id":71587,"avatar_url":"https://avatars.githubusercontent.com/u/71587?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonm23","html_url":"https://github.com/jasonm23","followers_url":"https://api.github.com/users/jasonm23/followers","following_url":"https://api.github.com/users/jasonm23/following{/other_user}","gists_url":"https://api.github.com/users/jasonm23/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonm23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonm23/subscriptions","organizations_url":"https://api.github.com/users/jasonm23/orgs","repos_url":"https://api.github.com/users/jasonm23/repos","events_url":"https://api.github.com/users/jasonm23/events{/privacy}","received_events_url":"https://api.github.com/users/jasonm23/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jasonm23","id":71587,"avatar_url":"https://avatars.githubusercontent.com/u/71587?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonm23","html_url":"https://github.com/jasonm23","followers_url":"https://api.github.com/users/jasonm23/followers","following_url":"https://api.github.com/users/jasonm23/following{/other_user}","gists_url":"https://api.github.com/users/jasonm23/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonm23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonm23/subscriptions","organizations_url":"https://api.github.com/users/jasonm23/orgs","repos_url":"https://api.github.com/users/jasonm23/repos","events_url":"https://api.github.com/users/jasonm23/events{/privacy}","received_events_url":"https://api.github.com/users/jasonm23/received_events","type":"User","site_admin":false},"milestone":null,"comments":15,"created_at":"2015-04-27T09:42:49Z","updated_at":"2015-05-11T04:41:48Z","closed_at":null,"body":"Will add to README :\r\n\r\n### Including bitmap images and other svg\r\n\r\nIt's possible to include external images, bitmap (png/jpg/gif) and svg, in your themes.\r\n\r\nFor online resources use their regular url, for offline/local resources we need to generate a `file:///` url, see below.\r\n\r\nIn any block that allows svg, (e.g. `:background` or `:overlay`) we'd use an `(image)` like so:\r\n\r\n```\r\n(image :xlink:href \"http://example.com/image.png\")\r\n```\r\n\r\nFor local/offline, let's assume the image is in the same folder as the theme, we'll need a useful prefix.\r\n\r\n```\r\n(setq themename:fileurl-prefix (concat \"file://\" (file-name-directory (or load-file-name buffer-file-name))))\r\n```\r\n\r\nWill give you the folder of the theme, so you can then do:\r\n\r\n```\r\n(image :xlink:href ,(concat themename:fileurl-prefix \"image.png\"))\r\n```\r\n\r\n#### (image)\r\n\r\n`(image)` will generate an svg [`<image>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_Image_Tag) tag. See [xmlgen](https://github.com/philjackson/xmlgen) for more details.\r\n \r\nNote that the `xlink:` xmlns is already provided for you.\r\n\r\n#### Does your build of Emacs support external SVG resources?\r\n\r\nLet us know if it does and what version / build / OS.\r\n"},"comment":{"url":"https://api.github.com/repos/sabof/svg-mode-line-themes/issues/comments/100764237","html_url":"https://github.com/sabof/svg-mode-line-themes/issues/13#issuecomment-100764237","issue_url":"https://api.github.com/repos/sabof/svg-mode-line-themes/issues/13","id":100764237,"user":{"login":"jasonm23","id":71587,"avatar_url":"https://avatars.githubusercontent.com/u/71587?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonm23","html_url":"https://github.com/jasonm23","followers_url":"https://api.github.com/users/jasonm23/followers","following_url":"https://api.github.com/users/jasonm23/following{/other_user}","gists_url":"https://api.github.com/users/jasonm23/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonm23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonm23/subscriptions","organizations_url":"https://api.github.com/users/jasonm23/orgs","repos_url":"https://api.github.com/users/jasonm23/repos","events_url":"https://api.github.com/users/jasonm23/events{/privacy}","received_events_url":"https://api.github.com/users/jasonm23/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T04:41:48Z","updated_at":"2015-05-11T04:41:48Z","body":"With Emacs mac port, I don't need to do this, I can use `file:///` as the url."}}