Webp sprite format

Webp sprite format

Hi all, anyone here successfully used WEBP instead of PNG? Seen any issues like performances?

Seems the size savings are HUGE :slight_smile: compared to PNG.



I have used it in the past for a project with a a lot of image resources. The savings in file size was indeed huge and cocos can display it without any issues. I have only 2 comments:

  1. Loading Webp in memory is much more slower. In case you have a lot, i advice you to split them into spritesheets, load only what is necessary in init and load the rest in the background. After some optimization, we managed to make loading times almost the same as png (for the user).
  2. In case you see issues with sprites having alpha channel, experiment with premultiply alpha option to fix your issue.

May you tell more about the optimisation? Thanks

hmm I haven’t noticed the slow loading yet. @kerryk thanks for your comments.

@stephenhurry what do you want to know beside the comments above?

I have been using webp for years as well. It has been working great, I didn’t feel much latency accompanied. The only concern to me is the slow update of the library by cocos.

@stephenhurry how far is the library behind in cocos?

well you have to raise a request to push the dev team: https://github.com/cocos2d/cocos2d-x/issues/18709

1 Like

@slackmoehrle anyway we can get https://github.com/cocos2d/cocos2d-x/issues/18709 prioritized for the next release?

Thank you!

I can talk with the team about it.

1 Like

@slackmoehrle Thank you!

@slackmoehrle please any news?

It will be fixed in the next release. Timing is still being planned.

1 Like

Thank you for the quick support!