Skip to content
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

issue loading image when imagepath contains special chars like % #1972

Closed
Ujjwal-soft opened this issue Nov 22, 2017 · 3 comments
Closed

issue loading image when imagepath contains special chars like % #1972

Ujjwal-soft opened this issue Nov 22, 2017 · 3 comments

Comments

@Ujjwal-soft
Copy link

Ujjwal-soft commented Nov 22, 2017

Description

imagepath for my image is :
/storage/emulated/0/Pictures/OGQ/Richard Walker_Stairway To Heaven%3F_YkFgR2RZ.jpg

tried loading image with above Url but it failed because it contains % as special char in path, otherwise works fine.

Additional Information

  • Fresco version: [1.5.0]
  • Platform version: [android all versions on all devices]
@dmitry-voronkevich
Copy link

Please look at this response on the similar issue: #1088 (comment)

@Ujjwal-soft
Copy link
Author

@dmitry-voronkevich looked into that before but none of the suggestions seems to be working...there is no method like parseFromFile() in Uri.parseFromFile(new File(path).. if you have some working solution, please suggest, thanks a lot!!

@Ujjwal-soft
Copy link
Author

Found a solutions to this:

convert imagepath to Uri as :
Uri picUri= Uri.fromFile(new File("/storage/emulated/0/Pictures/OGQ/Richard Walker_Stairway To Heaven%3F_YkFgR2RZ.jpg"

ImageRequest request=ImageRequestBuilder.newBuilderWithSource(picUri).setResizeOptions(new ResizeOptions(width, height)).build();

This will load image contains special chars or symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants