Re: JPEG-XL as Content-Encoding?

Yoav Weiss <yoav@yoav.ws> Thu, 20 August 2020 21:02 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 87DB83A1419 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 20 Aug 2020 14:02:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.896
X-Spam-Level:
X-Spam-Status: No, score=-2.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yoav-ws.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IL35RTpAs5Cs for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 20 Aug 2020 14:02:11 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A29613A1418 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 20 Aug 2020 14:02:11 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1k8rgn-000408-0i for ietf-http-wg-dist@listhub.w3.org; Thu, 20 Aug 2020 21:01:37 +0000
Resent-Date: Thu, 20 Aug 2020 21:01:37 +0000
Resent-Message-Id: <E1k8rgn-000408-0i@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <yoav@yoav.ws>) id 1k8rgl-0003zI-BQ for ietf-http-wg@listhub.w3.org; Thu, 20 Aug 2020 21:01:35 +0000
Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by mimas.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <yoav@yoav.ws>) id 1k8rgj-0005B5-Ro for ietf-http-wg@w3.org; Thu, 20 Aug 2020 21:01:35 +0000
Received: by mail-lj1-x22f.google.com with SMTP id v9so3637343ljk.6 for <ietf-http-wg@w3.org>; Thu, 20 Aug 2020 14:01:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yoav-ws.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=2Dhyrnv2Yd+yxxHzX+WlU0AFSB46mJ25fx+e/dEYneE=; b=f+OphT2JwlAtvaLl9EP97IaWSXc2wJEnaAKyunUC5XhmCO/LnGXLL5bikX8NuCL9wQ F2krVgkAVmWbtKTLQNHsWlWsUhzfM8e+IJsx2G5Sq00HBxTrOWwzKYm4yCsODxkiRohR VO2drutYznDNJIQIh26tuNw+rWTEpfghniOREheC/9hE9pyALaeaIxUsGLMhNxac8HjU FccNFsgDk/HeTSFbqZn9FoP2Y4uEQuuvxvRIJKwyKTVlBcwgds7SoYeD1Kv3QkLG2LQz aeg/+g+2TgeM7w2OpEtvMNK+t7QhUWNkHmEwLX1X4GmnnwtPe0po327bjpncTQfYA2hi 88Jw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=2Dhyrnv2Yd+yxxHzX+WlU0AFSB46mJ25fx+e/dEYneE=; b=A0FMYyuEEgiCrLsA/d55w36vwJZwy0WGvK7cOCCGQemx3iDzhCt27DWB47rEqL/sZ9 k/vLfqtmNfEBnZRCXQ+6RoiYWpy/OWs4O9izeJGgM0fc0PtZ0G0FHKy9j1fC+UQEegpS pBTkt2GyPJtxeZAIZhZPeVQtV6lFMuvoMg1QySoDnSmnV7Fr6W6Of/91ICXpaICb8t+E G5ek/zhmPPFlm5zNVWKrd78tBIi6nnsa4Nt2ISqN1rh3ruQX/3Ay1/kQ+aZPZRhnXKMG KAGggmsvOe2q2C/V7GcPJpnwexv8VtVE3MgX5JHNoMoFX4/idsaY4EcWH2iHucfqOYDM xK+g==
X-Gm-Message-State: AOAM533prhJh0b5+IixOa+C0vT3c2HWs2dhR5BYWwZBobzZy8TJURugN FZddSk+qXmasSQk5dNE4QWPZUugDC9MZsEFOP0lgLofGveg=
X-Google-Smtp-Source: ABdhPJzfDxxNmJ/NVkIoYSFZVJbfOkBf4EZiuDzxV8NCe7Du4bWqg9MQ9vnVnFceHPu3nqaD6qaseZHwZLKHlRptjVQ=
X-Received: by 2002:a2e:89c2:: with SMTP id c2mr63578ljk.201.1597957281121; Thu, 20 Aug 2020 14:01:21 -0700 (PDT)
MIME-Version: 1.0
References: <CACj=BEjdwH1OtS=uQXsgPN3XVJvVEUeisjeF5_iro1vg0omqWQ@mail.gmail.com> <20200820151401.GB21689@1wt.eu> <20200820183008.GA8086@lubuntu>
In-Reply-To: <20200820183008.GA8086@lubuntu>
From: Yoav Weiss <yoav@yoav.ws>
Date: Thu, 20 Aug 2020 23:01:04 +0200
Message-ID: <CACj=BEhec403pUpKDtBLiaeKojsN4TX6Uo+0C1LHEm9=BVKghQ@mail.gmail.com>
To: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="0000000000001b9a7005ad556cd2"
Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=yoav@yoav.ws; helo=mail-lj1-x22f.google.com
X-W3C-Hub-Spam-Status: No, score=-8.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1k8rgj-0005B5-Ro 965485dc9e28a7994ebedc47dc606108
X-Original-To: ietf-http-wg@w3.org
Subject: Re: JPEG-XL as Content-Encoding?
Archived-At: <https://www.w3.org/mid/CACj=BEhec403pUpKDtBLiaeKojsN4TX6Uo+0C1LHEm9=BVKghQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37944
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Thu, Aug 20, 2020 at 8:33 PM Dmitri Tikhonov <dtikhonov@litespeedtech.com>
wrote:

> Hello Yoav, Willy:
>
> > On Thu, Aug 20, 2020 at 04:11:54PM +0200, Yoav Weiss wrote:
> > >
> > > I'm slightly more skeptical about how automatic that would be, and
> find it
> > > somewhat strange to have image-specific content-encoding, while other
> image
> > > formats are served as separate mime types and negotiated with `Accept`.
>
> I agree that this would be strange.
>
> > >    - Are web servers more likely to perform JPEG=>JPXL transformations
> if
> > >    JPXL is a content encoding, compared to browser support for it as
> an image
> > >    format?
> > >       - Note that those transformations are CPU heavy, so will need to
> be
> > >       cached, or done at "build" time.
>
> The transformation cost can be amortized over time by using a file
> cache in the web server.
>
> On Thu, Aug 20, 2020 at 05:14:01PM +0200, Willy Tarreau wrote:
> > Well, I don't know about this JPEG-XL but I'd argue that one very
> > important aspect of the content-coding is that it must absolutely
> > be possible to recover the original data by applying the inverse
> > transformation, as it's not supposed to transform the content but
> > only its representation. And intermediary might want to cache such
> > contents and use them to deliver the original image to clients not
> > compatible with this format, just as can be done with compressed
> > contents for example.
>
> I subscribe here as well.  In my mind, the way to switch the response
> from JPEG to JPXL is as follows:
>
>     Request:
>
>         GET /image.jpg
>         Accept: image/jpxl
>
>     Response:
>
>         OK...
>         Content-Type: image/jpxl
>         Vary: accept
>
> If 'Accept' does not specify image/jpxl, the server returns the original
> JPEG image.  Note that there is still the white lie of the image's .jpg
> extension, but this lie is smaller than the much more elaborate dance
> with the Content-Encoding.
>

Yeah, this is what I referred to as "exposing JPXL as an image format", and
the way we typically ship new formats (e.g. webp).


>
>   - Dmitri.
>
>
>