Comments (12)
but thinking about it further, the fix is trivial so probably not worth your time doing it...
That's what I was secretly thinking but didn't want to sound like a jerk.
I'll take your offer to not spend any further time on this.
Appreciate your work on this! Thank you so much.
from media-command.
@rayrutjes Just wondering: you wouldn't perhaps have a broken image that we could use (without licensing issues) to build a regression test?
from media-command.
We might be able to produce the bug with images in here: https://github.com/ianare/exif-samples/tree/master/jpg
from media-command.
Note:
Test images can be uploaded to https://github.com/wp-cli/wp-cli.github.com/tree/master/behat-data
from media-command.
@schlessera TBH I wanted to give you the images, but i had a hard time isolating them :/ .
I needed to re-do the full import of thousands of images in a clean environment and I didn't know what to do with it anyway (but you just shared how above).
Not sure I'll have time this week to find the images that broke. I'll add it to my todolist though.
from media-command.
@rayrutjes Ok, thanks! As I posted above, we might have found broken example files already that are CC. So, hopefully, you don't need to bother going through everything again.
from media-command.
I could not reproduce this bug with the images from the repository of EXIF samples I posted above.
from media-command.
Okay reproduced the PHP warning by uploading a BMP with Imagick disabled and as the GD image editor can't handle it no sizes metadata is saved, and then regenerating with Imagick enabled.
Will do fix based on this though obviously it would be much better to have at least one of the original trigger images @rayrutjes if you get the time...
PR incoming...
from media-command.
I wanted to PR the image but the other repo seems read only :)
https://we.tl/BPNOcnRlgv
My logs report this one was causing the issue.
I've been unable to re-produce, probably because if you run it several time on a failing image the error occurs only the first time.
I hope this file is not a false positive.
from media-command.
Thanks very much @rayrutjes. I'm guessing it is a false positive in that a different file is generating the sizes undefined message, as the polygon-or.jpg
file does produce sizes metadata even though the EXIF is faulty. That plus the ordering (the EXIF message should occur after the sizes message on regenerate I think) and time gap.
This makes sense to me on looking at the "wp-admin/includes/image.php" code too. If you could work out which file after polygon-or.jpg
might have no sizes metadata that would be cool, if not cool also...
from media-command.
Makes sense, in that case I will need to re-do the full import on a blank new instance.
Or maybe you have a trick to remove all existing metadata?
from media-command.
Or maybe you have a trick to remove all existing metadata?
Not in a good way, off the top of my head!
I will need to re-do the full import on a blank new instance
I'm happier now with the manufactured BMP method mentioned above as a reasonable test, but if that was possible and you would be able to identify the file and you have the time then that would be great...
Edit: but thinking about it further, the fix is trivial so probably not worth your time doing it...
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.