DynamiteRedGames said:
The JavaScript library that RPG Maker MV uses already supports WebP image files, but the developers of RPG Maker hard coded the ".png" file extension into its ImageManager.loadBitmap() method, which you can find in rpg_managers.js One solution would be just to edit that file and replace ".png" with ".webp". This however would force you to use WebP for all of your images, including tilesets, system images, etc. I wanted a hybrid approach so that I could use both PNG and WebP files, so what I did was override the ImageManager.loadBitmap() method in a separate plugin, and added a bit of code to check if the PNG file exists. If the PNG doesn't exist, then it trys to load the file as .webp instead. Another unrelated change I made was to change RPG Maker's error handling of missing image files so that the game doesn't hard crash, but just loads a blank texture.