coderef

WEBGL_compressed_texture_pvrtc WebGL extensionLimited availability

The WEBGL_compressed_texture_pvrtc extension for WebGL 1.0 and 2.0 contexts adds PVRTC compressed texture formats to compressedTexImage2D() and compressedTexSubImage2D().

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
✕Not supportedup to 155
Current: 155
Edge
✕Not supportedup to 154
Current: 154
Firefox
✕Not supportedup to 157
Current: 157
Safari
1–6Not supported
7+Supportedsince Oct 22, 2013
Current: 27
MobileChrome Android
18–27Not supported
28+Supportedsince Jul 10, 2013
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
1–6Not supported
7+Supportedsince Sep 18, 2013
Current: 27

How to use

Not supported in Chrome, Edge, Firefox, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: WEBGL compressed texture pvrtc.

Feature detection

JS · check before using
if ("WEBGL_compressed_texture_pvrtc" in globalThis) {
  // WEBGL_compressed_texture_pvrtc is available
} else {
  // load a polyfill or use a fallback
}