-
-
Notifications
You must be signed in to change notification settings - Fork 711
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
Feature Request: Ability to set the XHR Header #947
Comments
I'm not convinced this is something that should be exposed. I would recommend against always setting the In general, I would also recommend against using automatic lossy image recompression of web-quality JPEG images when image quality is important (such as for panoramas). Yes, the file size may be reduced, but the image quality is frequently reduced as well. For high-quality images, WebP does not necessarily do better than JPEG at equivalent bitrates, anyway. |
Hello, Thanks for the reply. Unfortunately I dont have much of a choice here as that the direction the my company is taking with the use of the CloudFlares Polish tool. It will only cache at the CF edge in webp. So our company is trying to decrease bandwidth etc from Origin server to CF. At the end of the day I just thought it would save me carrying a custom build of the plugin if it was exposed to allow me to overwrite the headers when needed. I understand I need to wire-up feature support detection for webp and probably going to go with Google and Mondernizer recommended detection logic there. I do understand being hesitant about exposing this, so ill just do all my logic in a separate function/file and then just update the plugin source to call my method. This way it will be easier to update the plugins src and modify each time. Again thanks for the reply and love this plugin by the way. |
I just opened an issue on the HTML standard repository about adding a method for checking if a browser supports a specific image format. If such a method is eventually adopted by browsers, I'll revisit this feature request, so I'm going to leave it open. |
Hi,
We use Pannellum behind a CloudFlare setup. We are enabling a feature in CF called Polish that help to optimize images passing through it. One of the feature is it will convert/compress JPG to Webp but the Accept header must explicitly contain 'image/webp' and currently pannellum sends 'images/*'.
It would be nice if this could be controlled via a setting/option. For now im going to modify our local version of the js file
The text was updated successfully, but these errors were encountered: