↑ ↓ select, Enter open, Esc close

Find large images in wp-content/uploads

Adjust the values, the command updates live
user@server
find /var/www/vhosts/example.com/httpdocs/wp-content/uploads -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.gif' -o -iname '*.webp' \) -size +500k -printf '%s\t%p\n' | sort -rn | head -50 | numfmt --field=1 --to=iec

Searches for all images above the minimum size in kilobytes and shows the 50 largest with size and path. Typical candidates are unedited camera photos and photos saved as PNG, which hurt load time and LCP. The list is a good starting point for compression or resizing.

Note: WordPress generates several sizes for each upload, what matters is which variant the page actually serves.

Also searched as

  • find images larger than 500 kb
  • which images slow down my site
  • huge uploads in wordpress
  • find uncompressed images wordpress

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.