Board Thread:Technical Updates/@comment-26339491-20191203204132/@comment-3403151-20200217200045

Serving webp files when the url says .jpg and .png is by design. AND IS THE PROBLEM.

It's not a "bug", it was a design decision to intentionally allow the image server to be able to serve an image with a mime type which does not match the file extension.

Edit: Well I just wasted 30 minutes of my life wading through Wikia's spaghetti code on github to try to locate exactly where the thumbnails are generated. I suspect - but am happy to be disproven - that the source for Vignette (and "Thumblr", the thumbnail generator) is not public.

Edit: Yep, located at https://github.com/Wikia/vignette/ rather than https://github.com/Wikia/app/ where everything else is.

The thumbnailer is https://github.com/Wikia/vignette/blob/master/src/vignette/util/thumbnail.clj and while there are clearly parts mentioning webp, I still can't tell how it decides whether to use a webp thumnail. Obviously "photos" are more commonly being served as webp than "graphics", so it probably has something to do with comprehensibility, but I can't see where the choice is made.