WebP textures not working in Safari - ERROR 3121 (Cocos Creator 2.4.x)

Hello developers,

I’m experiencing a critical issue with WebP texture format in Safari browser using Cocos Creator 2.4.x.

Problem description

I need to use WebP format to reduce project size. WebP textures work perfectly in Chrome and Firefox, but fail to load in Safari with the following error:

Safari Console Error:

ERROR 3121: Can't find a texture format supported by the current platform! 
Please add a fallback format in the editor.

_deserialize — cocos2d-js-min.js:26095:52

Versions tested

  • :cross_mark: Cocos Creator 2.4.10 — WebP not working in Safari
  • :cross_mark: Cocos Creator 2.4.15 (latest 2.4.x) — WebP not working in Safari
  • :white_check_mark: Cocos Creator 3.7.8 — WebP works correctly in Safari

Technical details

  • Safari version: 14+ (which officially supports WebP format)
  • Browsers tested:
    • Chrome — :white_check_mark: works
    • Firefox — :white_check_mark: works
    • Safari — :cross_mark: ERROR 3121
  • Build platform: Web Mobile
  • Issue: Engine incorrectly detects WebP support in Safari and doesn’t add it to cc.macro.SUPPORT_TEXTURE_FORMATS

Question

I need to use Cocos Creator 2.4.x specifically (cannot migrate to 3.x due to project requirements).

Is there an official fix or workaround for WebP support in Safari for version 2.4.x?

Or can you suggest which engine files need to be modified to fix WebP detection in Safari?

Thank you for any help!