mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 14:15:50 -06:00
[GH-ISSUE #280] Local images in Image tags only appear after a hotfix #190
Labels
No labels
bug
documentation
enhancement
libui issue
pull-request
question
wait for libui implementation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/proton-native#190
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ZetDude on GitHub (Apr 8, 2020).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/280
Describe the bug
When putting a relative path into the uri field of an Image tag's source property, the image will not display, however it will take the correct amount of "space" given in the width and height of its style property.
Such an issue doesn't occur when loading from an external URL, the image appears immediately
To Reproduce
Minimal example:
Run with
npm run devand then modify the source uri to something likeimg/next.pngin the case of this example. When saving that change, it should automatically apply a hotfix which makes the image actually appearExpected behavior
The image loads from the relative path immediately
Screenshots


Versions:
Additional context
Possibly related to #262
@jabza commented on GitHub (Jul 27, 2020):
Seeing this also on 2.0.4
@spit4520 commented on GitHub (Nov 1, 2020):
I have a similar issue, I am unable to use local image assets without receiving the following error:
Warning: Failed prop type: Invalid propsourceof typestringsupplied toImage, expectedobject.I have tried importing my assets at the top like so:
import Test from '../assets/images/testing.png'; const Test2 = require('../assets/images/secondTest.png');I have used these implementations:
<Image source={Test} style={{height: 50, width: 50}}/><Image source={{uri: Test2}} style={{height: 50, width: 50}}/><Image source={{uri: "../assets/images/testing.png" style={{height:50, width:50}}/>None of the above work. They all throw the exact same issue.
My current version of proton is:
2.0.4I installed it through the proton-cli npx package.
I would really like to use this for my companies embedded solution in our factories, so I am hoping to get some basic issues resolved. Is there any better documentation on the native layer? I will need to use native libraries in SPI and other lower languages to build better high level components for our uses.
Thanks