As reported in T414805, we serve PNG thumbnails for WebP files. That's fine (although WebP is really very widely supported these days, so we might want to revisit that at some point), but currently rather than showing a WebP original, we instead serve a PNG thumbnail of the same size, which can be a non-standard size.
This can be seen e.g. https://commons.wikimedia.org/wiki/File:Myrlyn_1.0.0_screenshot.webp - both opening in MediaViewer on a large display will attempt to display a PNG (which is currently often instead presenting an error), and the largest "thumb" size under the image is the original-size-thumbnail.
In both cases, the WebP original should be displayed instead.