Skip to content
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

Add responsive image component #43

Open
gmaclennan opened this issue Jun 3, 2016 · 0 comments
Open

Add responsive image component #43

gmaclennan opened this issue Jun 3, 2016 · 0 comments

Comments

@gmaclennan
Copy link
Member

Displaying images could be more efficient. We use our own resizing service which is running on http://resizer.digital-democracy.org/ to get thumbnails and previews. We need an <Image> component that uses [react-dimensions](https://github.com/digidem/react-dimensions] to choose the best size to request. Our resizer currently whitelists certain domains - we should detect 403 errors and just load the original full-size image in that case.

We could speed things up more by keeping track of sizes of image that have been loaded and when requesting a larger image show a smaller one that will be in the browser cache first whilst the larger version loads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant