-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[Image] Getting intrinsic Image size in the onLoad event #2180
Comments
I think the reworking of image is what the change from separate RCTNetworkImage and RCTStaticImage to a single RCTImageView was. I guess it should be fine, and I think it is good information to have available to JS. |
+1 I have posted on stackoverflow about this .. tumbleweed. I hadn't noticed #494, @paramaggarwal, so I may look into this now, too. |
ps. you are not a unique use-case :) |
I can confirm we aren't planning on changing or extending the current implementation of RCTImageView in the next few weeks, if you'd like to propose any new functionality or file any PRs. |
That means you can go for it @DUBERT! Looking forward to the PR. |
Working on it, just kind of stuck right here: #2234 |
Submitted a PR: #2364 |
Shame that this never made it in. Manual patching is now more complex as Master has changed so much.. |
As I said in the PR feedback, we need to provide a way to preload images and get their dimensions, but doing it onscreen with |
I understand, thanks @nicklockwood. Thanks also to @DUBERT for the solutions provided. |
Hi there! This issue is being closed because it has been inactive for a while. But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/image-getting-intrinsic-image-size-in-the-onload-event ProductPains helps the community prioritize the most important issues thanks to its voting feature. Also, if this issue is a bug, please consider sending a PR with a fix. |
Is this currently being looked at or in? Are there any, currently working, solutions? Kind regards, |
I really needed to get the actual image size from a network image, so I could use it in styling my app.
@paramaggarwal showed me how to do it in this issue #494 and suggested I submit a PR for it.
I saw a comment somewhere by @vjeux that reworking Image was planned. Should I go ahead and do this? Or will it be unnecessary soon? Or am I a unique use-case?
The text was updated successfully, but these errors were encountered: