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 502DF3A1418 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 20 Aug 2020 14:02:14 -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 sAFFxi4t1qz4 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 6900B3A1415 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 20 Aug 2020 14:02:10 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1k8reu-0003u4-BE for ietf-http-wg-dist@listhub.w3.org; Thu, 20 Aug 2020 20:59:40 +0000
Resent-Date: Thu, 20 Aug 2020 20:59:40 +0000
Resent-Message-Id: <E1k8reu-0003u4-BE@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 1k8rep-0003tJ-WC for ietf-http-wg@listhub.w3.org; Thu, 20 Aug 2020 20:59:36 +0000
Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by mimas.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <yoav@yoav.ws>) id 1k8ren-00057B-Uy for ietf-http-wg@w3.org; Thu, 20 Aug 2020 20:59:35 +0000
Received: by mail-lj1-x230.google.com with SMTP id w14so3640611ljj.4 for <ietf-http-wg@w3.org>; Thu, 20 Aug 2020 13:59: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 :cc; bh=N2O/MvJHWqrLqnVOdoExZvlR+aHPWAtOJmeBS5X+Wbw=; b=RoKtdqusKJPk1ZD4N0uy9dLKq337AbNt2a7F+ww82N4rP/wwsGgIkm4fYQ3xSO4gDT 56nlZ1GZ5HSjuoUj8MU5QiID4WXUuupR3/oAqfMJr9vsbVxuUVXkMe/AeBj5VS5O7Qsa zmt3J6cti57Hzyjp4aGJbGyg6BM8KtzDTR4ZEWY3saFTuK8kP983LEb1npHpWRHipXd/ G8rA6+KB8AD/XnAjMtPH72c2IwfOgYUFy+zDRLJYGtwMMtmj2dIgzzrW77O052JD3Ufr lw6YWphsSHYzwmI+h1eP6fW9SKxDqgBVCWr+tJTmyvo0PPR+42VjQxXBKq4RFi1OPkEc NQEw==
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:cc; bh=N2O/MvJHWqrLqnVOdoExZvlR+aHPWAtOJmeBS5X+Wbw=; b=Cias1iKU21H/fMqXYzNzXbPTwo3XTwQwfluvVArT7lyxZjg2MzTkGrVMZrljnkUpW2 4qwzhF6Za8J9eGwcra3bWjMzqXDGeWP1jqxvx86HEh23PqEil9VrdP3495NdpU8nCzvi 7QWT3z4CmK11jkqytG4kqwjT3FhmtXbKhuCgigXQfa3WaKI0oem18VSCVY08sTiOQVOh OqHe84IjMyqCmI/IzcqhI6Ym8OGyBwMnAuwGbWxbHlEJ94TtpJRgQxox13xi9+gS/5hv hSiix21lSpdHHou+bnJ2zsK6owGxIlP8itu+OE7KpjrN8rQkHdpP7mxVtrSCS0huXkM7 TDrA==
X-Gm-Message-State: AOAM530Z+hku0+iwQWxgewdLxhWiX8QUO+vTicZEi6DspyQRb2D1TWOf 5VyqAXmhvpali6/B/mgKXuwW8jYU8yQCdToCHZFE9ghYUoQ=
X-Google-Smtp-Source: ABdhPJyKPKU4DhpITTcKMDmW8foyBlFYRhrr234zlR9favEvwBQPRd4STg5Qmd78ypcU/xyxrVpe9kqmR2+cEJiPFbM=
X-Received: by 2002:a2e:5301:: with SMTP id h1mr58846ljb.147.1597957161303; Thu, 20 Aug 2020 13:59:21 -0700 (PDT)
MIME-Version: 1.0
References: <CACj=BEjdwH1OtS=uQXsgPN3XVJvVEUeisjeF5_iro1vg0omqWQ@mail.gmail.com> <20200820151401.GB21689@1wt.eu>
In-Reply-To: <20200820151401.GB21689@1wt.eu>
From: Yoav Weiss <yoav@yoav.ws>
Date: Thu, 20 Aug 2020 22:59:05 +0200
Message-ID: <CACj=BEgjGetSvFqLw_WAPEk2FWjtf++44ZjMc4jXrEPo_CanQQ@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>
Cc: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="000000000000f78cff05ad55647c"
Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=yoav@yoav.ws; helo=mail-lj1-x230.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 1k8ren-00057B-Uy 7144cea432f01743cdf438a529f6c4e6
X-Original-To: ietf-http-wg@w3.org
Subject: Re: JPEG-XL as Content-Encoding?
Archived-At: <https://www.w3.org/mid/CACj=BEgjGetSvFqLw_WAPEk2FWjtf++44ZjMc4jXrEPo_CanQQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37943
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 5:14 PM Willy Tarreau <w@1wt.eu> wrote:

> Hi Yoav,
>
> On Thu, Aug 20, 2020 at 04:11:54PM +0200, Yoav Weiss wrote:
> > Hey HTTPers!
> >
> > I was reviewing an intent to add JPEG-XL as a content-encoding
> > <
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACZPrBjS75%3D%2B%3DSexFkJ7ewkBXDOF6FhkpwQYBeWn6sT57n1-_w%40mail.gmail.com?utm_medium=email&utm_source=footer
> >
> > for JPEG images, and thought I'd get some feedback from y'all regarding
> it.
> >
> > The team behind JPEG-XL think that since it can be used to
> > seamlessly transform JPEGs, it might be interesting to enable that
> > transformation to happen at the HTTP layer and get ~20% smaller images
> > *automagically*, as compression would be done by supporting web servers
> and
> > image compression providers.
> >
> > 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`.
> >
> > So, a few questions:
> >
> >    - Would it make sense to have an image specific content-encoding?
> >    - 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.
> >    - Same question for CDNs
> >    - Finally for CDNs who already transform images - have you run into
> >    compatibility issues coming from web content manipulating raw image
> bytes
> >    directly, and failing to do that post-transformation?
> >
> > I'd highly appreciate y'all's opinions!
>
> 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 have no idea if this is the case here.
> Otherwise I don't see how it could qualify as a content-encoding.
>

I should've made that point clearer - JPEG-XL (in legacy mode, which is
what's discussed for Content-Encoding) can be losslessly transformed to
JPEG and vice-versa.


>
> Just my two cents,
> Willy
>