Invalid argument(s): File on path is not an image.
See original GitHub issueHey guys. There is a problem with URLs that have query params such as facebook images firebase storage images, etc.
For image on this link:
(https://scontent.flju2-1.fna.fbcdn.net/v/t1.0-9/71515447_2410538489194566_4191628866734784512_n.jpg?_nc_cat=1&_nc_oc=AQlh0ua3e1wQE5YN8CLL1ebDQSVhN9U-xa1k23i8dgUqMQX5apqyNxsYsWYJx65dbBM&_nc_ht=scontent.flju2-1.fna&oh=c2036dc3070d4c1fcd6b17e73c9ab6ad&oe=5E3176F8)
library spews out Unhandled Exception: Invalid argument(s): File on path is not an image.
I didn’t go too deep into debugging, but I’d say that
bool isImage(String path) => imageFormats.contains(extension(path).toLowerCase());
returns false
, because extension(path)
call doesn’t handle extensions okay, when there are query params involved. 😃
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Invalid argument(s): No host specified in URI file - flutter
I'm getting the below error in my code when I try to display the profile image which is connected through ...
Read more >Getting “Invalid argument” error when attempting to check ...
My first guess is that pngcheck expects a path to a file, not a pattern. If you have several files to check you...
Read more >Invalid argument(s): No host specified in URI file:///null-Flutter
Coding example for the question Flutter Error: Invalid argument(s): No host specified in URI file:///null-Flutter.
Read more >Calling save on image fails due to file path options not being ...
Image object and then calling save() results in the error: imb_savepng: Cannot open file for writing: '' Invalid argument Error: Python: ...
Read more >Error codes - AWS Documentation
The command includes two or more incompatible arguments. ... For example, if booting from an enclave image file that is not valid, the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jok3erc0ncy30 Use this instead…
https://pub.dev/packages/image_downloader Works for any images and video. Best package ever
resolved