Skip to content
This repository was archived by the owner on Jan 16, 2021. It is now read-only.

Create an Image Component #94

Open
iranreyes opened this issue May 6, 2018 · 1 comment
Open

Create an Image Component #94

iranreyes opened this issue May 6, 2018 · 1 comment
Assignees

Comments

@iranreyes
Copy link
Member

iranreyes commented May 6, 2018

Let's create/find an Image component to use.

Requirements:
Support for srcset and picture. (If it has sources as children will be a picture, if uses srcset, will use an image srcset, src tag by default)
Placeholder image
Support to specify sizes
Support for webp detection (optional) (tree shaking)
Lazy loading. On scroll threshold (Intersection Observers support)

Note: Not include the picture polyfill if is not supported, but write about it, will be up to the project.

References:
https://www.npmjs.com/package/react-ideal-image
https://www.npmjs.com/package/react-lazyload
https://www.npmjs.com/package/lazysizes
https://github.com/verlok/lazyload

@neo
Copy link
Member

neo commented May 7, 2018

I think this could go hand in hand with #5 to have a component to handle this plus lazy loading :D

@iranreyes iranreyes changed the title Start using picture/srcset by default Create an Image Component Jun 18, 2018
@artemleznikov artemleznikov self-assigned this Aug 1, 2018
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

3 participants