<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>280011</bug_id>
          
          <creation_ts>2024-09-19 13:46:35 -0700</creation_ts>
          <short_desc>Add Quirks for overriding the Image Accept-Type for nhl.com</short_desc>
          <delta_ts>2025-01-19 22:22:05 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 18</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=269875</see_also>
          <bug_file_loc>https://nhl.com/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>178758</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Karl Dubost">karlcow</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2061603</commentid>
    <comment_count>0</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-09-19 13:46:35 -0700</bug_when>
    <thetext>Cloudinary worked with Apple to not send anymore JPEG2000 to websites. 
nhl.com seems to still be sending some JPEG2000 to Safari on iOS only.

We can create a quirk to force the server to not send the JPEG2000.


See Bug 269875 for booking.com in the past
https://github.com/WebKit/WebKit/pull/24923


Steps to reproduce:
1. On iPhone with Safari
2. Go to https://nhl.com/

Expected: 
See the images

Actual:
Some images are not visible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061604</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-09-19 13:46:59 -0700</bug_when>
    <thetext>&lt;rdar://problem/136315336&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061621</commentid>
    <comment_count>2</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-09-19 14:16:33 -0700</bug_when>
    <thetext>See Also https://github.com/webcompat/web-bugs/issues/141887 for Outreach efforts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061656</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-09-19 15:36:09 -0700</bug_when>
    <thetext>Example of an HTTP request failing for 
https://media.d3.nhle.com/image/private/t_ratio16_9-size50/dpr_2.0/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg

```
:method: GET
:scheme: https
:authority: media.d3.nhle.com
:path: /image/private/t_ratio16_9-size50/dpr_2.0/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg
Accept: image/webp,image/avif,image/jxl,image/heic,image/heic-sequence,video/*;q=0.8,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Priority: u=5, i
Referer: https://www.nhl.com/
Sec-Fetch-Dest: image
Sec-Fetch-Mode: no-cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Safari/605.1.15
```

which leads to this HTTP response

```
:status: 200
Accept-Ranges: bytes
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Content-Length,ETag,Server-Timing,X-Content-Type-Options
Age: 9131
Cache-Control: public, max-age=31536000
cf-cache-status: HIT
cf-ray: 8c5ce6f0da3b0fcc-LAX
Content-Length: 184683
Content-Type: image/jp2
Date: Thu, 19 Sep 2024 22:09:47 GMT
edge-cache-tag: 171565319839284922343488783462977444242,352914003381548804891280351548701409701,7a7e1c8a0d5c02db22a0dd5b7c64799f,~1~f0fbea064432605bfb4f7bee6ea508e8a63fec23
ETag: &quot;e3ae41649502d350d554dddba7ddf161&quot;
Expires: Fri, 19 Sep 2025 22:09:47 GMT
Last-Modified: Thu, 19 Sep 2024 19:30:06 GMT
Server: cloudflare
Server-Timing: cld-fastly;mitm=acp;dur=1531;cpu=1;start=2024-09-19T19:30:04.133Z;desc=miss,rtt;dur=0,content-info;desc=&quot;width=2560,height=1440,bytes=184683,owidth=2568,oheight=1444,obytes=365119,ef=(1,13,17,23)&quot;,cloudinary;dur=1519;start=2024-09-19T19:30:04.141Z,cld-id;desc=df2edeae613fe0feb92f386122d35f1a
Strict-Transport-Security: max-age=604800
Timing-Allow-Origin: *
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
x-request-id: df2edeae613fe0feb92f386122d35f1a
```


The markup is 
```
&lt;figure class=&quot;d3-o-media-object__figure fa-image -ratio-16-9&quot;&gt;
    &lt;picture class=&quot;d3-o-media-object__picture&quot;&gt;
    &lt;!--[if IE 9]&gt;&lt;video style=&quot;display: none; &quot;&gt;&lt;![endif]--&gt;
    &lt;source 
        media=&quot;(min-width:1024px)&quot; 
        srcset=&quot;
            https://media.d3.nhle.com/image/private/t_ratio16_9-size50/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg 1x, 
            https://media.d3.nhle.com/image/private/t_ratio16_9-size50/dpr_2.0/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg 2x, 
            https://media.d3.nhle.com/image/private/t_ratio16_9-size50/dpr_3.0/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg 3x&quot;&gt;
    &lt;source 
        media=&quot;(min-width:768px)&quot; 
        srcset=&quot;
            https://media.d3.nhle.com/image/private/t_ratio16_9-size40/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg 1x, 
            https://media.d3.nhle.com/image/private/t_ratio16_9-size40/dpr_2.0/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg 2x, 
            https://media.d3.nhle.com/image/private/t_ratio16_9-size40/dpr_3.0/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg 3x&quot;&gt;
    &lt;source 
        srcset=&quot;
            https://media.d3.nhle.com/image/private/t_ratio16_9-size30/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg 1x, 
            https://media.d3.nhle.com/image/private/t_ratio16_9-size30/dpr_2.0/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg 2x, 
            https://media.d3.nhle.com/image/private/t_ratio16_9-size30/dpr_3.0/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg 3x&quot;&gt;
    &lt;!--[if IE 9]&gt;&lt;/video&gt;&lt;![endif]--&gt;
    &lt;img alt=&quot;LINE DANCING&quot; 
        class=&quot;img-responsive&quot; 
        loading=&quot;lazy&quot; 
        src=&quot;https://media.d3.nhle.com/image/private/t_ratio16_9-size30/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg&quot;&gt;
    &lt;/picture&gt;
  &lt;/figure&gt;
```

for this markup only 
https://media.d3.nhle.com/image/private/t_ratio16_9-size50/dpr_2.0/f_auto/v1726774090/prd/xo9sccwwnp3ywlwzzmnm.jpg
is sent as JPEG2000 because this is the one requested with source selection

but if I look at understanding which of these are JPEG2000 vs JPEG, this is about half of them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062350</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-09-23 09:47:10 -0700</bug_when>
    <thetext>Note that a UA override is not solving anything.

I need to test Accept Headers. 

The Accept Header for 

# Safari 

HTML: 
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Image: 
  Accept: image/webp,image/avif,image/jxl,image/heic,image/heic-sequence,video/*;q=0.8,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5


# Firefox 

HTML: 
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Image: 
  Accept: image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5


# Chrome

HTML:
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Image: 
  Accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2065067</commentid>
    <comment_count>5</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-10-02 22:37:30 -0700</bug_when>
    <thetext>I don’t know if something changed recently. 
But I can’t reproduce on macOs and iOS both iPhone and iPad.

It would be good to have other people to confirm. https://nhl.com/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088450</commentid>
    <comment_count>6</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-01-19 22:22:05 -0800</bug_when>
    <thetext>This has been I believe this has been resolved.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>