Follow-up to config tweaks from T372165
We had set 400 pixels as the lower bucket for wgMediaViewerThumbnailBucketSizes and the config came through correctly in production, but the minimum size we were seeing used on some pages is 500px on certain examples where there was not a thumbnail image to pull URLs from (eg the fullsize image is loaded):
- https://test.wikipedia.org/wiki/Image-bucket-test#/media/File:File,_Asu%C3%A1n,_Egipto,_2022-04-01,_DD_142.jpg (This page should display fine once the config is re-tweaked).
Versus a page with a thumbnail where MultimediaViewer tries to guess the proper thumbnail URLs by rewriting them:
Per early discussion on this task we confirmed that this _should_ be giving back 500 as per the steps in wgThumbnailSteps however this logic only gets run when asking the server for a URL via API. If there was a thumbnail on the page being pulled from, MultimediaViewer is skipping around that and just asks for whatever size it wants.
Things to look into for a spike:
- can we clean up the Thumbnail url helper classes to respect wgThumbnailSteps?
- is there already some core JS logic we can piggyback on to reduce code bloat/duplication?
- do we have to audit for similar code elsewhwere?