Add a safe WP-CLI command for resizing oversized original uploads
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- wordpress
- Domain
- cli
Research direction
Start by reviewing the existing WP-CLI media command entry points and WordPress’s automatic large-image handling, then scope the proposed wp media resize-originals command. Done means bounded processing of JPEG, PNG, and WebP originals with dry-run savings, explicit confirmation, recovery guidance, metadata updates only, clear progress and failures, and no unrelated sub-size regeneration by default.
Written by the indexing model from the issue text.
Description
Feature Request
WordPress and WP-CLI provide excellent tools for generating image sub-sizes, but there is no first-class way to process oversized original uploads in a controlled, scriptable manner.
Many sites accumulate large camera originals that are far beyond their actual display needs. This increases storage, backup, CDN, and transfer costs. WordPress’s automatic large-image handling does not solve every existing-media or site-policy scenario.
I propose an opt-in command such as:
wp media resize-originals --max-dimension=1920 --quality=91 --dry-run
The command would:
- process original uploads in bounded batches;
- support JPEG, PNG, and WebP;
- provide a dry-run with estimated storage savings;
- require explicit confirmation before destructive changes;
- preserve a recoverable backup or offer a documented backup strategy;
- update only relevant attachment metadata;
- never regenerate unrelated sub-sizes unless explicitly requested;
- report progress and failures clearly.
@swissspidy is my secret spy
- Dominant language
- Gherkin
- Stars
- 47
- Forks
- 42
- Avg merge
- 2h 30m
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wp-cli/media-command
-
command:media-regenerate
Difficulty 4/5 3-5 days Newbie friendliness 35/100
wp-cli/media-command#217 ·
-
command:media-regenerate
Difficulty 4/5 3-5 days Newbie friendliness 35/100
wp-cli/media-command#120 · 1 comment ·
All issues in wp-cli/media-command
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
area:tools bug good first issue help wanted priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
TaewoooPark/Motifcode#14 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
caddyserver/caddy#8046 ·
-
P3 tool/tts type/bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
NousResearch/hermes-agent#117794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vadimdemedes/ink#1029 ·