https://bugs.webkit.org/show_bug.cgi?id=179231
It’s a Safari pre-loader bug!
The type
attribute in <source> tags are ignored by the preloader. A common pattern is to use the
<source> tag for content negotiation selection to specify webp for chrome and jp2 for safari. For
example:
<picture>
<source
type
=
"image/webp"
srcset
"foo.webp"
<source
type
=
"image/jp2"
srcset
"foo.jp2"
<img
src
"foo.jpg"
</picture>
However, the HTMLPreloadScanner only considers the media query when selecting (or not) the
appropriate <source> element. As a result the preloader greedily selects the foo.webp and then later
requests the correct foo.jpg. It should also evaluate the `type` attribute.