-
Notifications
You must be signed in to change notification settings - Fork 522
Local Images Not Rendering in Android App Using Flet #3376
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
Labels
bug: regression
A feature that worked correctly doesn't anymore
flet-mobile-app
Concerns the Flet mobile app
Comments
The Flet app needs to be updated #3096. |
Hello. This issue still occurs on Flet 0.27.6 Local images show on Windows execution, but not in Android execution. Code example for replicating
ResultImage route is not correct, it parses out the '/' on image's src path Flet version:
Operating system:
Software used:
pip list
Will provide additional details if necessary. I'm also new to Flet, sorry for any inconvenience. Thanks^^ |
@mlc1503 please open a new issue. |
1 task
Done. Check issue 5198 here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug: regression
A feature that worked correctly doesn't anymore
flet-mobile-app
Concerns the Flet mobile app
Description
Hello,
I started development using Flet. I created an ft.image component pointing to my local image. When I run it using "flet run" or "flet run main.py," everything works correctly, and the image appears. However, when using "flet run --android" and opening the application using the app from the Play Store, my image is not rendered.
If I host the image (e.g., on GitHub) and use an HTTPS link as the src, the image appears.
Debugging the code, I noticed that when pointing to a path, for example, "/images/man.png," it adds a "rootfolder/main.py" prefix in the GET request.
Example: if I set ft.image(src="images/man.png"), the debug shows it as "GET rootfolder/main.pyimages/man.png" (as shown in the image).
I have already tried adding the assets folder to assets_dir and using Unix and Windows absolute paths. But it doesn't work, only with a hosted file.
Code example to reproduce the issue:
Main.py
Login
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Flet version (
pip show flet
):Give your
requirements.txt
file (don'tpip freeze
, instead give direct packages):Operating system:
Windows 11 (VS CODE), but running app using flet app from play store
Additional environment details:
The text was updated successfully, but these errors were encountered: