Closed Bug 1727033 Opened 3 years ago Closed 3 years ago

Firefox can't shows avif image returned by Cloudflare CDN with CF's "image-resizing" feature enabled

Categories

(Core :: Graphics: ImageLib, defect)

Firefox 92
defect

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox91 --- unaffected
firefox92 blocking disabled
firefox93 + fixed

People

(Reporter: irvin, Assigned: jbauman)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

On Firefox 92.0b7 beta, sites that had Cloudflare image-resizing enabled will receive all images in AVIF format (converted on the fly at Cloudflare edge), but are unable to showing normally.

Chrome open same sites/images normally.
And Firefox prior to 91 (or close avif support from about:config?filter=image.avif.enabled ) will receive webp without a problem.

This can affect a massive user base, consider how many sites that are covered through Cloudflare cdn on their static resources.

test case: https://womany.net/cdn-cgi/image/w=620,h=340,fit=scale-down,f=auto/https://castle.womany.net/images/ad_items/12702/62bb1e1d502ee900cabf5920ba01b116.png (the origin is png, will convert on the fly with cf's cdn-cgi script into avif / webp)
the image

The image-resizing feature is available to all CF's enterprise customers, it will automatically convert images into the preferred format that the browser supported.
https://developers.cloudflare.com/image-resizing/

The test case link will ship different image to different browsers:
currently - webp to Firefox <91, avif to Firefox 92+ (beta/nightly), avif to Chrome, jpg to Mac Safari

Attachment #9237435 - Attachment description: the same Firefox (dev) that open sample avif file from bug 14433863 without problem → the same Firefox (dev) that open sample avif file from bug 1443863 without problem
Summary: Firefox can't open avif returned by Cloudflare image-resizing CDN cache → Firefox can't shows avif image returned by Cloudflare CDN with "image-resizing" feature

users will find all images on specific website disappeared on Firefox,
for example in the case of this screenshot, https://womany.net

See Also: → AVIF

Comment on attachment 9237433 [details]
the sample avif image received from CF

the sample avif image received from CF, which is not openable on Firefox but work on Chrome

Attachment #9237433 - Attachment description: the received avif image which is not openable on Firefox but work on Chrome → the sample avif image received from CF
Component: Untriaged → ImageLib
Product: Firefox → Core

Both of these images will display if the pref image.avif.compliance_strictness is set to 0.

Flags: needinfo?(jbauman)

[Tracking Requested - why for this release]: images/avif support on very common site

(In reply to Timothy Nikkel (:tnikkel) from comment #8)

Both of these images will display if the pref image.avif.compliance_strictness is set to 0.

confirmed.

cf will ship avif to the browser that had announced the acceptable of image/avif on the header.
we will need this option to be set as default when released to prevent such massive compatible issues arise from sites with similar infrastructure.

Summary: Firefox can't shows avif image returned by Cloudflare CDN with "image-resizing" feature → Firefox can't shows avif image returned by Cloudflare CDN with CF's "image-resizing" feature enabled

There's only 2 betas left before 92 goes to RC. Given that this affects Cloudflare, we should probably figure out sooner rather than later if this changes the go/no-go status of AVIF.

These files are invalid per the specification and the fix to Cloudflare's writer has already been committed, so I think it would be preferable to have them fix this on their end. See more detail in bug 1727106.

Given that this isn't a correctness issue in Firefox, and there is a workaround for end users, I don't think it makes sense to delay shipping AVIF by default. It is, after all, how we find out about these issues. This one in particular isn't new: the change was made over 2 months ago in the mp4parse-rust library and landed in Nightly nearly 3 weeks ago via bug 1723247.

If it's infeasible for Cloudflare to fix their files, we could consider temporarily changing the default value of image.avif.compliance_strictness to 0, which would render any AVIF which we can unambiguously interpret, no matter how invalid. The downside being reduced signal to buggy writer implementations, but perhaps that's a good trade-off if the change is short-lived.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(jbauman)
Resolution: --- → DUPLICATE
Assignee: nobody → jbauman
Blocks: AVIF
See Also: AVIF1727106

Speaking for Cloudflare here. We won't be able to fix our files for Firefox 92. We have lots of AVIF files cached, and we can't just flush them all, because AVIF is so painfully expensive to re-generate. We'd prefer if you shipped relaxed conformance.

Oops, didn't mean to resolve this. It's probably more sensible to have bug 1727106 be the duplicate.

Status: RESOLVED → VERIFIED
Status: VERIFIED → REOPENED
Resolution: DUPLICATE → ---
See Also: → 1727242

(In reply to kornel from comment #13)

Speaking for Cloudflare here. We won't be able to fix our files for Firefox 92. We have lots of AVIF files cached, and we can't just flush them all, because AVIF is so painfully expensive to re-generate. We'd prefer if you shipped relaxed conformance.

Eventually this will be addressed by a change to mp4parse-rust, but in the short term we will plan to address this by temporarily relaxing conformance via bug 1727448 which will be uplifted for the 92 release.

See bug 1443863 comment 80 for the rationale

Blocks: 1727449

This bug is fixed for Fx92+ by way of bug 1727448 per comment 18, but I'm leaving this bug open until the mp4parse-rust change lands before we call this fixed for good since the loosening of parsing conformance is meant to be a temporary solution.

Status: REOPENED → ASSIGNED
Depends on: 1728216
Pushed by jbauman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/41d912a2ca5c Firefox can't shows avif image returned by Cloudflare CDN with CF's "image-resizing" feature enabled. r=tnikkel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

With Win10:

  • 94.0a1 (2021-09-15) fresh profile it was opened without any issue;
  • 93.0b9 opening a profile on 92.0b7 on initial load there was a NS_BINDING_ABORTED status listed on the Transferred (NetMonitor) section, however ... after a page refresh the image was re-downloaded as avif and it seems to work fine.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: