{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/react-native/pulls/comments/46993492","id":46993492,"diff_hunk":"@@ -104,9 +110,13 @@ function getBasePath(asset) {\n  */\n function getScaledAssetPath(asset) {","path":"Libraries/Image/resolveAssetSource.js","position":63,"original_position":61,"commit_id":"2065ab316b2d8961f79d437f1b32b08bc9b8e740","original_commit_id":"076649e858a09ebeb19ce638786fdef64c34bb95","user":{"login":"zahanm","id":341374,"avatar_url":"https://avatars.githubusercontent.com/u/341374?v=3","gravatar_id":"","url":"https://api.github.com/users/zahanm","html_url":"https://github.com/zahanm","followers_url":"https://api.github.com/users/zahanm/followers","following_url":"https://api.github.com/users/zahanm/following{/other_user}","gists_url":"https://api.github.com/users/zahanm/gists{/gist_id}","starred_url":"https://api.github.com/users/zahanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zahanm/subscriptions","organizations_url":"https://api.github.com/users/zahanm/orgs","repos_url":"https://api.github.com/users/zahanm/repos","events_url":"https://api.github.com/users/zahanm/events{/privacy}","received_events_url":"https://api.github.com/users/zahanm/received_events","type":"User","site_admin":false},"body":"I see. So supposing the app is sideloaded at `file://apps/foobar/sideload/main.jsbundle` , an asset would look like `file://apps/foobar/sideload/assets/drawable_mdpi/uikit_button_special_icon`\r\n\r\nOn iOS, we actually use the JS folder structure, so the asset would be at `file://apps/foobar/sideload/assets/drawable_mdpi/uikit/button/special/icon.png`\r\n\r\nI suppose to keep platform conventions we should keep these as being different. What do you think @frantic / @nicklockwood ?\r\n\r\nAt any rate, can you mention these examples in the PR description, and put an example inline in a comment in `getScaledAssetPath`. This will vastly help folks understand what's going on here in the future.","created_at":"2015-12-08T18:35:50Z","updated_at":"2015-12-08T18:35:50Z","html_url":"https://github.com/facebook/react-native/pull/4527#discussion_r46993492","pull_request_url":"https://api.github.com/repos/facebook/react-native/pulls/4527","_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments/46993492"},"html":{"href":"https://github.com/facebook/react-native/pull/4527#discussion_r46993492"},"pull_request":{"href":"https://api.github.com/repos/facebook/react-native/pulls/4527"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/4527","id":52509701,"html_url":"https://github.com/facebook/react-native/pull/4527","diff_url":"https://github.com/facebook/react-native/pull/4527.diff","patch_url":"https://github.com/facebook/react-native/pull/4527.patch","issue_url":"https://api.github.com/repos/facebook/react-native/issues/4527","number":4527,"state":"open","locked":false,"title":"Load assets from same folder as JSbundle (Android)","user":{"login":"geof90","id":8598682,"avatar_url":"https://avatars.githubusercontent.com/u/8598682?v=3","gravatar_id":"","url":"https://api.github.com/users/geof90","html_url":"https://github.com/geof90","followers_url":"https://api.github.com/users/geof90/followers","following_url":"https://api.github.com/users/geof90/following{/other_user}","gists_url":"https://api.github.com/users/geof90/gists{/gist_id}","starred_url":"https://api.github.com/users/geof90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geof90/subscriptions","organizations_url":"https://api.github.com/users/geof90/orgs","repos_url":"https://api.github.com/users/geof90/repos","events_url":"https://api.github.com/users/geof90/events{/privacy}","received_events_url":"https://api.github.com/users/geof90/received_events","type":"User","site_admin":false},"body":"https://github.com/facebook/react-native/issues/3679 was only partially fixed as the behaviour only works on iOS. This implements the same behaviour for Android. If the JSBundle was loaded from the assets folder, this will load images from the built-in resources. Else, load the image from the same folder as the JS bundle.","created_at":"2015-12-03T09:29:50Z","updated_at":"2015-12-08T18:35:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2dcec13c073b12f110c741b99d96de6469d49a4a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react-native/pulls/4527/commits","review_comments_url":"https://api.github.com/repos/facebook/react-native/pulls/4527/comments","review_comment_url":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/4527/comments","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/2065ab316b2d8961f79d437f1b32b08bc9b8e740","head":{"label":"geof90:patch-1","ref":"patch-1","sha":"2065ab316b2d8961f79d437f1b32b08bc9b8e740","user":{"login":"geof90","id":8598682,"avatar_url":"https://avatars.githubusercontent.com/u/8598682?v=3","gravatar_id":"","url":"https://api.github.com/users/geof90","html_url":"https://github.com/geof90","followers_url":"https://api.github.com/users/geof90/followers","following_url":"https://api.github.com/users/geof90/following{/other_user}","gists_url":"https://api.github.com/users/geof90/gists{/gist_id}","starred_url":"https://api.github.com/users/geof90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geof90/subscriptions","organizations_url":"https://api.github.com/users/geof90/orgs","repos_url":"https://api.github.com/users/geof90/repos","events_url":"https://api.github.com/users/geof90/events{/privacy}","received_events_url":"https://api.github.com/users/geof90/received_events","type":"User","site_admin":false},"repo":{"id":47321202,"name":"react-native","full_name":"geof90/react-native","owner":{"login":"geof90","id":8598682,"avatar_url":"https://avatars.githubusercontent.com/u/8598682?v=3","gravatar_id":"","url":"https://api.github.com/users/geof90","html_url":"https://github.com/geof90","followers_url":"https://api.github.com/users/geof90/followers","following_url":"https://api.github.com/users/geof90/following{/other_user}","gists_url":"https://api.github.com/users/geof90/gists{/gist_id}","starred_url":"https://api.github.com/users/geof90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geof90/subscriptions","organizations_url":"https://api.github.com/users/geof90/orgs","repos_url":"https://api.github.com/users/geof90/repos","events_url":"https://api.github.com/users/geof90/events{/privacy}","received_events_url":"https://api.github.com/users/geof90/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geof90/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/geof90/react-native","forks_url":"https://api.github.com/repos/geof90/react-native/forks","keys_url":"https://api.github.com/repos/geof90/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geof90/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geof90/react-native/teams","hooks_url":"https://api.github.com/repos/geof90/react-native/hooks","issue_events_url":"https://api.github.com/repos/geof90/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/geof90/react-native/events","assignees_url":"https://api.github.com/repos/geof90/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/geof90/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/geof90/react-native/tags","blobs_url":"https://api.github.com/repos/geof90/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geof90/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geof90/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/geof90/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geof90/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/geof90/react-native/languages","stargazers_url":"https://api.github.com/repos/geof90/react-native/stargazers","contributors_url":"https://api.github.com/repos/geof90/react-native/contributors","subscribers_url":"https://api.github.com/repos/geof90/react-native/subscribers","subscription_url":"https://api.github.com/repos/geof90/react-native/subscription","commits_url":"https://api.github.com/repos/geof90/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/geof90/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/geof90/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/geof90/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/geof90/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/geof90/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geof90/react-native/merges","archive_url":"https://api.github.com/repos/geof90/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geof90/react-native/downloads","issues_url":"https://api.github.com/repos/geof90/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/geof90/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/geof90/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/geof90/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geof90/react-native/labels{/name}","releases_url":"https://api.github.com/repos/geof90/react-native/releases{/id}","created_at":"2015-12-03T09:18:17Z","updated_at":"2015-12-03T09:18:23Z","pushed_at":"2015-12-07T19:37:07Z","git_url":"git://github.com/geof90/react-native.git","ssh_url":"git@github.com:geof90/react-native.git","clone_url":"https://github.com/geof90/react-native.git","svn_url":"https://github.com/geof90/react-native","homepage":"http://facebook.github.io/react-native/","size":34809,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"1c57291faae4cd13a4686dd18cb59c4fb4d40560","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":29028775,"name":"react-native","full_name":"facebook/react-native","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react-native","description":"A framework for building native apps with React.","fork":false,"url":"https://api.github.com/repos/facebook/react-native","forks_url":"https://api.github.com/repos/facebook/react-native/forks","keys_url":"https://api.github.com/repos/facebook/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react-native/teams","hooks_url":"https://api.github.com/repos/facebook/react-native/hooks","issue_events_url":"https://api.github.com/repos/facebook/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react-native/events","assignees_url":"https://api.github.com/repos/facebook/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react-native/tags","blobs_url":"https://api.github.com/repos/facebook/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react-native/languages","stargazers_url":"https://api.github.com/repos/facebook/react-native/stargazers","contributors_url":"https://api.github.com/repos/facebook/react-native/contributors","subscribers_url":"https://api.github.com/repos/facebook/react-native/subscribers","subscription_url":"https://api.github.com/repos/facebook/react-native/subscription","commits_url":"https://api.github.com/repos/facebook/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react-native/merges","archive_url":"https://api.github.com/repos/facebook/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react-native/downloads","issues_url":"https://api.github.com/repos/facebook/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react-native/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react-native/releases{/id}","created_at":"2015-01-09T18:10:16Z","updated_at":"2015-12-08T18:33:55Z","pushed_at":"2015-12-08T18:13:28Z","git_url":"git://github.com/facebook/react-native.git","ssh_url":"git@github.com:facebook/react-native.git","clone_url":"https://github.com/facebook/react-native.git","svn_url":"https://github.com/facebook/react-native","homepage":"http://facebook.github.io/react-native/","size":52417,"stargazers_count":23561,"watchers_count":23561,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3850,"mirror_url":null,"open_issues_count":1059,"forks":3850,"open_issues":1059,"watchers":23561,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/4527"},"html":{"href":"https://github.com/facebook/react-native/pull/4527"},"issue":{"href":"https://api.github.com/repos/facebook/react-native/issues/4527"},"comments":{"href":"https://api.github.com/repos/facebook/react-native/issues/4527/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react-native/pulls/4527/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react-native/pulls/4527/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react-native/statuses/2065ab316b2d8961f79d437f1b32b08bc9b8e740"}}}}