facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.92k stars 24.3k forks source link

Hope to support image rendering in webp format #31727

Closed codthing closed 1 year ago

codthing commented 3 years ago

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

I want to render images in webp format in react-native-webview. Even if I added in dependencies in android/app/build.gradle

implementation'com.facebook.fresco:animated-webp:1.10.0'
implementation'com.facebook.fresco:webpsupport:1.10.0'

It was not rendered either.

React Native version:

Expo CLI 4.5.2 environment info:
    System:
      OS: Windows 10 10.0.19042
    Binaries:
      Node: 16.2.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.10 - C:\Users\Administrator\AppData\Roaming\npm\yarn.CMD
      npm: 7.13.0 - C:\Program Files\nodejs\npm.CMD
    SDKs:
      Android SDK:
        API Levels: 27, 28, 29, 30
        Build Tools: 27.0.3, 28.0.3, 29.0.2, 30.0.3
    IDEs:
      Android Studio: Version  4.2.0.0 AI-202.7660.26.42.7351085
    npmPackages:
      expo: ~40.0.0 => 40.0.0
      react: 16.13.1 => 16.13.1
      react-dom: 16.13.1 => 16.13.1
      react-native: 0.63.4 => 0.63.4
      react-native-web: ~0.13.12 => 0.13.18
    Expo Workflow: bare

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. android/app/build.gradle , dependencies
  2. add
    implementation'com.facebook.fresco:animated-webp:1.10.0'
    implementation'com.facebook.fresco:webpsupport:1.10.0'

Expected Results

Rendering images in webp format in react-native-webview

trcoffman commented 1 year ago

This should be closed. The webview is provided by the OS and there's nothing that react-native can do to affect what kinds of images it can support.