Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Medium style image blur load #33

Open
UPLukeet opened this issue Oct 10, 2020 · 1 comment
Open

Medium style image blur load #33

UPLukeet opened this issue Oct 10, 2020 · 1 comment

Comments

@UPLukeet
Copy link

<ProgressiveImage src={require("../assets/Card-images/" + Image)} placeholder={require("../assets/Card-images-Placeholder/" + Image)}>
                                                {(src, loading) => (
                                                    <img style={{ filter: loading ? blur(8px) : blur(0) }} src={src} alt="projects" />
                                                )}
                                            </ProgressiveImage>

I tried this sort of thing but It didn't seem to work

@UPLukeet
Copy link
Author

<ProgressiveImage src={require("../assets/Card-images/" + Image)} placeholder={require("../assets/Card-images-Placeholder/" + Image)}>
                                                {(src, loading) => (
                                                    <img style={{ filter: loading ? "blur(5px)" : "blur(0)" }} src={src} alt="projects" />
                                                )}
                                            </ProgressiveImage>

me being stupid this is how to add a blur effect

@UPLukeet UPLukeet changed the title is there any way to add a blur effect to the placeholder? Medium style image blur load Oct 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant