Any way to list large files in Matrix?

(Douglas (@finnatic at @waikato)) #1

Matrix Version:

Is there any easy way to generate an asset listing (per site, per server) of files known to Matrix that are over a certain size?

I’ve caught a number of oversized images in watching server traffic e.g. 24MB files that can be resized to 40k - and in looking further at what’s on the server have identified large files in /data/ (using find at the command line) that don’t seem to be known by Matrix - so I’m assuming they’re unused.

What would be more useful is to know which oversized assets are live, and need someone attending to them or raising them with end users where training might be of use.

I’m thinking I could presumably do something with SSJS and a listing asset?

(Tbaatar) #2

You could use Screaming Frog SEO Spider to crawl whatever is visible to Search Bots to find the large images.
Using Matrix asset listing to list all images on the website seems bit intense if the site is over 100k in assets.


(John gill) #3

Image assets have the file size stored as an attribute, which means you can use it for sorting an Asset Listing to show the big ones first.

Of course, an Asset Listing to list all the Image assets in your site might not actually finish, as tbaatar mentioned. If it does finish, that would be the quickest way.