Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
output attributes on HTML's <input type=file> element #237
Request for Mozilla Position on an Emerging Web Specification
Proposal to add various output attributes on HTML's
<input type="file" accept="image/*" output="image/jpeg" outputDimensions="1:1">
Conversions can include:
This is intended to address the long-tail problem and complexity of converting/editing files by deferring the problem to either the OS or the browser (instead of JS libraries, CDNs, WASM, etc., which, it is argued by those making the proposal, haven't seen adoption in the long tail).
I am sympathetic to the argument that, even if client-side image optimization is technically possible today, it's the sort of complex thing that gets deployed by big sites when optimizing at scale. So this could both empower smaller developers, and nudge the ecosystem in a positive direction.
On the flip side, I'm concerned about runaway complexity. The WICG thread is already talking about options for chroma sub-sampling, and it's not at all clear to me where the feature line should be drawn. Same goes for formats and media types.
Agree, I also said the same in the thread. I think it should be possible to find a reasonable sub-set however. There is some precedence on iOS around images, for instance, and file size hints... and we could definitely make a case to triage, say, 2-3 things that would give the most return on investment. If those become interoperable, then pick up the next few from there and incrementally build on those across UAs.