What is the behavior when the thumbnail is larger than the image file? Does
the
webp get delivered without conversion to JPEG?

Example:

image.webp with resolution 400*300 gets uploaded to Commons

An en-wiki-user embedds the file with [[image.webp|900px]]

It should output a jpeg thumbnail that is 400px wide (Never outputting the original file is controlled by the mustRender() method. For webP this is always set to true. Not outputting thumb greater than source width is controlled by isVectorized().)