We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I am looking to use the preview or remove the preview loading feature with local files. Is this possible? looking to do something like this:
return images.map((src, index) => { let previewSrc = src; if (src.startsWith("file")) { // previewSrc = require(src); previewSrc = src; } else { previewSrc = { src: "data:image/png;base64," + src + '"' }; } return ( <Image key={`image_${index}`} style={styles.slideImage} resizeMethod="resize" {...{ preview: previewSrc, uri: src, }} />
The text was updated successfully, but these errors were encountered:
@oporter1 did you ever figure this out? I'm running into the same issue.
Sorry, something went wrong.
@adamzolyak I wasn't, I did a work around that checks if it's a file and, if so, then we just display a regular image.
return images.map((src, index) => { if (!src.startsWith("file")) { return ( <ImageCached key={`image_${index}`} style={styles.slideImage} resizeMethod="resize" {...{ preview: { src: "data:image/png;base64," + src + '"' }, uri: src, }} /> ); } else { return ( <Image source={{ uri: src }} style={styles.slideImage} key={`image_${index}`} /> ); } }); }, [images]);
No branches or pull requests
Hello,
I am looking to use the preview or remove the preview loading feature with local files. Is this possible?
looking to do something like this:
The text was updated successfully, but these errors were encountered: