-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ensure fetch/ajax image requests accept webp when supported #8262
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrewharvey Are you still working on this PR? The change itself looks fine to accept, but I want to understand how this affects the serving of non-tile resources if webp
is added to the accept header, before moving forward with it.
@samanpwbb @jseppi Would the sprite images endpoint be affected by the addition of an accepts
header with image/webp
?
@andrewharvey Are you still working on this PR? The change itself looks fine to accept, but I want to understand how this affects the serving of non-tile resources if webp is added to the accept header, before moving forward with it. Yes, I can pick this up again.
For more context, GL JS will always request a sprite image with the extension mapbox-gl-js/src/style/load_sprite.js Line 28 in 87cac3b
However as explained at #8261, when making a I tested Mapbox's API requesting the |
(edited) I did further testing, It does only test for webp once at the start (checking of one of the things I noted to test).
|
aa1a202
to
39e8df6
Compare
@andrewharvey how much of an issue is this? Does it matter if a few requests don't use |
Nothing more than a minor annoyance. I wouldn't hold up the requests because of this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are ✅. Can be merged with a unit test.
@andrewharvey Are you still working on this? I think we just need a unit test to merge it. |
@ryanhamley yes! unit test committed ✔️ |
Launch Checklist
fixes #8261
See further detail at ensure image requests send an accept header #8261 , but in essence this PR ensures image requests from GL JS to servers, include accepts image/webp where supported, so the server knows if it can respond with a webp image or not
document any changes to public APIscheck this webp support test is only run once, instead of at each tile request, and what impact it has on performancetested, only run oncetested