As of Apr 2017 thumbnails stored in swift are never deleted unless purged by mediawiki. This is useful in the general case but wasteful long-term, there is likely a lot (TBD) of thumbnails we can delete according to various criteria. For example:
- We only have e.g. less than 200 thumbnails for a given size
- Size hasn't been requested in the last 90 days
- Obviously huge sizes, e.g. wider than 10^5 pixels
Mediawiki doesn't know anything about what sizes have been stored or requested, therefore we'll have to walk the swift containers for deletion candidates. We can reuse thumb-stats from operations/software that does exactly this: walks all thumbnail containers and extract statistics about file size / dimensions and so on.
note the "pixels" and "size" in this context refer to thumbnail width, i.e. the pixel count that shows up in thumbnail URL