Skip to content

Add responsive image component #43

@gmaclennan

Description

@gmaclennan

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions