}
function canUseWebP() {
- var elem = document.createElement('canvas');
+ // TODO pictshare might have a webp conversion bug, try disabling this
+ return false;
- if (!!(elem.getContext && elem.getContext('2d'))) {
- var testString = !(window.mozInnerScreenX == null) ? 'png' : 'webp';
- // was able or not to get WebP representation
- return (
- elem.toDataURL('image/webp').startsWith('data:image/' + testString)
- );
- }
+ // var elem = document.createElement('canvas');
- // very old browser like IE 8, canvas not supported
- return false;
+ // if (!!(elem.getContext && elem.getContext('2d'))) {
+ // var testString = !(window.mozInnerScreenX == null) ? 'png' : 'webp';
+ // // was able or not to get WebP representation
+ // return (
+ // elem.toDataURL('image/webp').startsWith('data:image/' + testString)
+ // );
+ // }
+
+ // // very old browser like IE 8, canvas not supported
+ // return false;
}