Comments (8)
Hi @gnanet,
This was implemented in wp-cli/wp-cli#3751
from media-command.
Sorry to follow-up with this, but if the functionality is already there, then i need to debug the concrete issue somehow, but with --debug i did not get any extra information:
wp --debug media regenerate 1038
Debug (bootstrap): No readable global config found (0.283s)
Debug (bootstrap): No project config found (0.284s)
Debug (bootstrap): argv: /usr/local/bin/wp --debug media regenerate 1038 (0.285s)
Debug (bootstrap): ABSPATH defined: /var/www/vhosts/THEDOMAIN/httpdocs/ (0.289s)
Debug (bootstrap): Begin WordPress load (0.29s)
Debug (bootstrap): wp-config.php path: /var/www/vhosts/THEDOMAIN/httpdocs/wp-config.php (0.29s)
Debug (bootstrap): Loaded WordPress (1.422s)
Debug (bootstrap): Running command: media regenerate (1.431s)
Found 1 image to regenerate.
Warning: 1/1 Couldn't regenerate thumbnails for "ACBAR (Exzenter) – Getriebe" (ID 1038).
Error: No images regenerated.
from media-command.
Hi @gnanet,
GitHub issues are meant for enhancement requests and specific, reproducible bugs, not for general support questions. Bug reports need to be reproducible with a fresh WordPress install. If your issue only reproduces in your environment, then it's likely specific to your environment. For support options, please review http://wp-cli.org/#support
from media-command.
I will check the support options, and hope to find a way to get more debug info to see if it is reproducible, or only a separated issue. Thank you
I will have to inspect the condition of no metadata could be generated for PDFs if restricted to a specific image size because the PDF was imported by the media command, and initially no thumbnail got generated, and this happens also on regenerate, but no image size was manually specified.
from media-command.
I promise this is the last update, if i find any really reproducible bug i open a separate issue:
In the database i found no _wp_attachment_metadata field for the PDF in question, and manually adding a properly serialized value, based on other PDF-s did not help either. Then I used the nvola fork of force-regenerate-thumbnails which had no problems with the generation.
from media-command.
Can you provide steps to reproduce (including associated test data), please?
from media-command.
Ofcourse, not later than tomorrow late afternoon, because i have 117 PDF-s to be imported.
I will replay the process, document all steps including the relevant database content state on every step.
But I have a bad feeling that one of the plugins (most suspect is WP Download Manager Pro) hacks itself into the upload process as described in this stackoverflow comment which causing the wp_generate_attachment_metadata to return an empty array, but not die with some error.
from media-command.
I was having the same problem. After a bit of digging I realized that wp_generate_attachment_metadata()
is failing silently when either wp_get_image_editor()
or $editor->save( $preview_file, 'image/jpeg' );
returns an error.
I have created a patch to fix this: https://core.trac.wordpress.org/ticket/35959
from media-command.
Related Issues (20)
- Import into specific directory/location HOT 2
- Is it possible to generate "XXX-scaled.jpg"? HOT 1
- intermediate_image_sizes_advanced filter not passing 3 arguments (fatal error) HOT 1
- Regenerate webp format
- WP-CLI Running In Docker Container Unable to Bulk Import Media HOT 2
- Skip Duplicates HOT 1
- time limit exceeded `Operation canceled' @ fatal/cache.c/GetImagePixelCache/1868. HOT 4
- How does delete works? HOT 1
- Typo in description for --caption parameter
- Can't regenerate images listed in wp media image-size HOT 1
- Segmentation fault when regenerating images for specific image type, stops regeneration HOT 1
- Update tests for new behavior when unexpected 'thumbnail' image size when original image is 150x150
- Found 1 image to regenerate. Warning: Can't find "DSC_XXXX" (ID XXXX). HOT 1
- Option to override filename while importing media HOT 3
- Dead code in media command class HOT 1
- A question about using "wp media import" command. HOT 2
- No thumbnail when importing PDF file using `media import` HOT 3
- Regenerating a single image size (re-)generates auto-scaled big images & auto-rotated images HOT 4
- Remove outdated thumbnail sizes HOT 7
- CLI Disable for media upload "organize uploads into month and year" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from media-command.