-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: fix incorrect information about webp support in the source prop of React Native's Image component #4240
docs: fix incorrect information about webp support in the source prop of React Native's Image component #4240
Conversation
Hi @muhammadashfaq! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
✅ Deploy Preview for react-native ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
docs/image.md
Outdated
@@ -419,7 +419,7 @@ The image source (either a remote URL or a local file resource). | |||
|
|||
This prop can also contain several remote URLs, specified together with their width and height and potentially with scale/other URI arguments. The native side will then choose the best `uri` to display based on the measured size of the image container. A `cache` property can be added to control how networked request interacts with the local cache. (For more information see [Cache Control for Images](images#cache-control-ios-only)). | |||
|
|||
The currently supported formats are `png`, `jpg`, `jpeg`, `bmp`, `gif`, `webp`, `psd` (iOS only). In addition, iOS supports several RAW image formats. Refer to Apple's documentation for the current list of supported camera models (for iOS 12, see https://support.apple.com/en-ca/HT208967). | |||
The currently supported formats are `png`, `jpg`, `jpeg`, `bmp`, `gif`,`webp` (Android only), `psd` (iOS only). In addition, iOS supports several RAW image formats.`webp` format is supported on iOS only when bundled with the JavaScript code. Refer to Apple's documentation for the current list of supported camera models (for iOS 12, see https://support.apple.com/en-ca/HT208967). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
webp
format is supported on iOS only when bundled with the JavaScript code
Where is this coming from? Do you have a code reference from React Native or a GitHub issue for reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cortinico
Github Issue is opened.
#4165
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The currently supported formats are `png`, `jpg`, `jpeg`, `bmp`, `gif`,`webp` (Android only), `psd` (iOS only). In addition, iOS supports several RAW image formats.`webp` format is supported on iOS only when bundled with the JavaScript code. Refer to Apple's documentation for the current list of supported camera models (for iOS 12, see https://support.apple.com/en-ca/HT208967). | |
The currently supported formats are `png`, `jpg`, `jpeg`, `bmp`, `gif`,`webp`, `psd` (iOS only). In addition, iOS supports several RAW image formats. Refer to Apple's documentation for the current list of supported camera models (for iOS 12, see https://support.apple.com/en-ca/HT208967). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And let's add a separate paragraph about webp below please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure @cortinico
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cortinico added as a paragraph. Please take a look. Thanks
Summary:
This PR corrects the misinformation regarding
webp
image format support in thesource
prop of React Native'sImage
component documentation. The current description incorrectly states thatwebp
is only available when bundled with JavaScript on iOS, which is inaccurate.Changes:
Image
component'ssource
prop description to accurately reflect the platform support forwebp
format.webp
is supported on Android by default and on iOS when using libraries likereact-native-webp
orSDWebImage
.Impact:
This correction ensures that developers are provided with accurate information regarding image format support across platforms, helping avoid confusion and potential implementation errors.