Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear on the functionality of --only-missing for media regenerate #2608

Closed
ethanclevenger91 opened this issue Mar 30, 2016 · 2 comments
Closed

Comments

@ethanclevenger91
Copy link

Issue: Missing image sizes not regenerated
Environments tested: Windows 10 w/ PHP 5.6.16, Homestead vagrant box w/ PHP 7.0.2

To reproduce:

  1. Upload images through WordPress media uploader
  2. Define a new image size in theme's functions.php
  3. Run wp media regenerate --only-missing

Expected result: Image size added in step 2 is generated for all images
Actual result: No thumbnail regeneration needed for "[image-name]" (ID [image-id]). output for all images

Is this as intended or perhaps a bug?

@danielbachhuber
Copy link
Member

Sorry for the late reply, @ethanclevenger91.

I was able to reproduce your situation, although I'm not 100% clear on the expected behavior. WP-CLI's current behavior is to look at the sizes stored in attachment metadata, and generate image files for the sizes where the file doesn't exist.

I suppose we could also check the registered intermediate sizes too, but I'm not confident this wouldn't introduce unexpected behavior.

Thoughts?

@ethanclevenger91
Copy link
Author

Depends on what kind of unexpected behavior you're potentially foreseeing. In my experience, I'm almost exclusively using intermediate sizes that I've declared rather than the built-in ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants