Skip to content

[Android] Image blurRadius does not work when resizeMode is specified #16780

@philipyun

Description

@philipyun

Is this a bug report?

Yes. When using the blurRadius tag on the Image component, it only works when a resizeMode is omitted. This exists only in android.

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 6.11.0
Yarn: Not Found
npm: 3.10.10
Watchman: 4.9.0
Xcode: Xcode 9.1 Build version 9B55
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: ^16.0.0 => 16.1.0
react-native: ^0.49.3 => 0.49.5

Steps to Reproduce

  1. Make an image component
  2. Supply any source image to the component
  3. Give it a blur radius and a resize mode
  4. resize mode can be specified in either style prop or the resizeMode prop and the same issues will occur.

Expected Behavior

I should be able to specify a resize mode for dynamic fitting of an image and also have a blur filter applied to an image

Actual Behavior

The resize mode takes precedence over the blur filter and ignores any blurRadius value supplied to the image component. The screenshots below show both iOS and Android renderings using Expo's snack tool. I expect the way it works in iOS to work the same in Android.

android
ios

(Write what happened. Add screenshots!)

Reproducible Demo

A reproducible demo can found at this expo snack:

https://snack.expo.io/@philipyun/android-image-blurradius-bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions