镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Add responsive image component #43

Open

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.

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

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