I am trying to convert images from jpg to webp, upload them back to webflow and change the asset with the webp image. Unfortunately, I can’t change the file of the asset so I am trying to recreate a new asset and update the new asset on the page.
You don’t need to go through all of that headache. There is a conversion option directly in the assets panel if you expand it.
Once you expand it, click the tiny checkbox under the asset (second image) and then click on Compress and choose WebP. It will update the format for you inside of Webflow without having to swap out the image.
Not at the moment; as the description for the Update Page Content API mentions, it’s designed for secondary locales (this may change in the future though to support your primary locale!)
If this is for an App, you can make a Hybrid App and thus make an associated Designer Extension counterpart to your backend that’s calling Data APIs. The Designer Extension APIs have the ability to both upload assets (similar to the Data API, but it will reflect immediately in the Assets panel) andswap out the asset on the page.