Find images larger than a given pixel size
find images wider than 2560 pixels | find oversized images linux | check image resolution command line | imagemagick identify find large images | identify | imagemagick | images | dimensionsfind /var/www/vhosts/example.com/httpdocs/wp-content/uploads -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' \) -exec identify -format '%w %h %i\n' {} + 2>/dev/null | awk -v max=2560 '$1 > max || $2 > max'Uses ImageMagick to read the width and height of each image and prints only those where one side exceeds the limit. Images 6000 pixels wide are almost always oversized for the web and waste storage and load time. 2560 matches the threshold above which WordPress scales down large uploads itself.
Note: identify is part of the imagemagick package. With very many files the run takes a few minutes.
Also searched as
- find images wider than 2560 pixels
- find oversized images linux
- check image resolution command line
- imagemagick identify find large images