Do you remember the phpThumb() library? It was ridden with vulnerabilities, and most of the ThemeForest themes used it. But the idea behind it was not bad, was it? Generating images on the fly, and then saving them in a cache folder.

Could this be done with WebP? I think so. Resource -wise, I think it’s the best solution, if implemented in a smart and efficient way.