willnorris / willnorris/imageproxy

Add support for client hint headers

Open
#48 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
4k
Forks
513
PR merge metrics
No merged PRs in 30d

Description

Client Hints are defined by draft-grigorik-http-client-hints and are supported in the recently-released-to-stable Chrome 46. They allow user agents to provide additional hints regarding how the content is going to be rendered. Particularly interesting for imageproxy:

  • DPR (Device Pixel Ratio) - could be used to override the requested size options to accomodate higher DPR values
  • Width - override requested width, since the client hint indicates the width at which the image is actually going to be displayed
  • Downlink - could be used to change the default quality setting for JPEG images (?)

We may want to hide this behind a flag, at least for the time being, just to make sure it doesn't cause any problems. We'll also need to make sure and set an appropriate Vary header.

Further Reading:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named. Start by reading the Client Hints draft and the imageproxy request and response handling, then determine which hints and flag behavior are in scope; done should include appropriate Vary handling and tests for the selected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.