{"action":"created","issue":{"url":"https://api.github.com/repos/mariusbalcytis/webpack-bundle/issues/7","repository_url":"https://api.github.com/repos/mariusbalcytis/webpack-bundle","labels_url":"https://api.github.com/repos/mariusbalcytis/webpack-bundle/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/mariusbalcytis/webpack-bundle/issues/7/comments","events_url":"https://api.github.com/repos/mariusbalcytis/webpack-bundle/issues/7/events","html_url":"https://github.com/mariusbalcytis/webpack-bundle/issues/7","id":162752503,"number":7,"title":"Loading Images","user":{"login":"jorge-marques","id":1558256,"avatar_url":"https://avatars.githubusercontent.com/u/1558256?v=3","gravatar_id":"","url":"https://api.github.com/users/jorge-marques","html_url":"https://github.com/jorge-marques","followers_url":"https://api.github.com/users/jorge-marques/followers","following_url":"https://api.github.com/users/jorge-marques/following{/other_user}","gists_url":"https://api.github.com/users/jorge-marques/gists{/gist_id}","starred_url":"https://api.github.com/users/jorge-marques/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorge-marques/subscriptions","organizations_url":"https://api.github.com/users/jorge-marques/orgs","repos_url":"https://api.github.com/users/jorge-marques/repos","events_url":"https://api.github.com/users/jorge-marques/events{/privacy}","received_events_url":"https://api.github.com/users/jorge-marques/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-06-28T18:21:34Z","updated_at":"2016-08-11T19:55:37Z","closed_at":null,"body":"Can the webpack_asset function be used to load images?"},"comment":{"url":"https://api.github.com/repos/mariusbalcytis/webpack-bundle/issues/comments/239272795","html_url":"https://github.com/mariusbalcytis/webpack-bundle/issues/7#issuecomment-239272795","issue_url":"https://api.github.com/repos/mariusbalcytis/webpack-bundle/issues/7","id":239272795,"user":{"login":"ehough","id":369261,"avatar_url":"https://avatars.githubusercontent.com/u/369261?v=3","gravatar_id":"","url":"https://api.github.com/users/ehough","html_url":"https://github.com/ehough","followers_url":"https://api.github.com/users/ehough/followers","following_url":"https://api.github.com/users/ehough/following{/other_user}","gists_url":"https://api.github.com/users/ehough/gists{/gist_id}","starred_url":"https://api.github.com/users/ehough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehough/subscriptions","organizations_url":"https://api.github.com/users/ehough/orgs","repos_url":"https://api.github.com/users/ehough/repos","events_url":"https://api.github.com/users/ehough/events{/privacy}","received_events_url":"https://api.github.com/users/ehough/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T19:55:37Z","updated_at":"2016-08-11T19:55:37Z","body":"Just chiming in to express my support for this idea. I have a working configuration using the currently-published versions of both this bundle and [`entry-file-loader`](https://github.com/vaniocz/entry-file-loader).\r\n\r\nIn my Twig templates I have:\r\n```twig\r\n<img src=\"{{ webpack_asset('@app/img/logo.png', 'png') }}\" alt=\"logo\">\r\n```\r\nand in my webpack config:\r\n```javascript\r\nloaders: [\r\n  {\r\n    test: /\\.(png|jpg|jpeg|gif)$/,\r\n    loader: 'entry-file'\r\n  }\r\n  ...\r\n```\r\nThis setup works perfectly: free cache busting and the possibility to insert additional loaders to the images if I want. I would image that the same procedure would work for non-image files, too."}}
{"actor":{"display_login":"ehough"}}