Admin Forum:List of images by file size

I want to obtain a list of all images on my wiki by file size. I'm not talking about the table that is generated by Special:ListFiles, which has way too much extraneous information for my purposes. I just mean a "raw" list of the names of the files, ordered from biggest to smallest, kind of like how pagegenerators.py will give you a list of things. So, something like: File1.jpg File2.jpg File3.jpg I'm not seeing an obvious way to do it through DPL; as far as I can tell "file size" isn't a parameter on offer. Anyone got any suggestions? 15:23: Fri 21 Sep 2012
 * From what I understand, there's no way to do that directly. Copying ListFiles into Excel is probably your best bet. You could also use the  API, but even then the files aren't listed by size.  15:39, September 21, 2012 (UTC)
 * Of course! API to the rescue! Why didn't I think of that? The answer — though perhaps an inelegant one — turned out to be http://tardis.wikia.com/api.php?action=query&list=allimages&ailimit=1000&&aiminsize=1000000&aiprop=size Then, it was just a matter of sprinkling some regex dust on the results to extract the raw title name. Now, this doesn't, in fact, sort by size, but rather alphabetically by file name. But at least it's a list of all files that are bigger than 1mb.


 * Hey, since I'm not really that au fait with API, I was wondering what you meant by importing into Excel? Do you have to specify a particular format that makes a better Excel import? Is it literally copying an pasting, or do you do a data import? Do you think you could take a moment to walk me through how you go from the page generated by the above API URL to a usable spreadsheet in Excel? Thanks :) 14:42: Sat 22 Sep 2012


 * Rather than doing this in Excel, I think this would a great thing to do on the wiki itself, that way other editors can potentially do this. I've put together a quick example of what such a tool could look like at w:c:mathmagician:Allimages. Take a look at it and let me know if that looks like something that might work for you. (Note: it's not fully built yet, it's just a working demo)