Skip to content

Commit

Permalink
Images: Remove mention of platform-specific extensions
Browse files Browse the repository at this point in the history
This functionality was removed in facebook/metro@7674ca0, released in [Metro 0.59.0](https://github.com/facebook/metro/releases/tag/v0.59.0) and eventually in RN 0.64. This was a poorly-communicated breaking change at the time and we might want to undo it, but for now the website should reflect what actually works.

Related:
facebook/react-native#31099
facebook/react-native#31348
facebook/metro#676
  • Loading branch information
motiz88 authored Jun 23, 2021
1 parent ac6f9a5 commit dfc529c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ React Native provides a unified way of managing images and other media assets in
<Image source={require('./my-icon.png')} />
```

The image name is resolved the same way JS modules are resolved. In the example above, the bundler will look for `my-icon.png` in the same folder as the component that requires it. Also, if you have `my-icon.ios.png` and `my-icon.android.png`, the bundler will pick the correct file for the platform.
The image name is resolved the same way JS modules are resolved. In the example above, the bundler will look for `my-icon.png` in the same folder as the component that requires it.

You can also use the `@2x` and `@3x` suffixes to provide images for different screen densities. If you have the following file structure:
You can use the `@2x` and `@3x` suffixes to provide images for different screen densities. If you have the following file structure:

```
.
Expand Down

0 comments on commit dfc529c

Please sign in to comment.