I'm using webp as I need support for transparency in a video/gif format. My issue is I need the element to disappear once the animation has finished, and I'm not sure how exactly I can figure out when that has happened without hard coding it (which could lead to inconsistencies on slower hardware).
Before I was looping through a PNG sequence but the performance wasn't great, so I'd rather use this format if possible.
I'm using JavaScript and I currently just have it in an tag as such:
<img src="../../../assets/animations/anim.webp">