wagtail-wordpress-import
wagtail-wordpress-import copied to clipboard
`get_or_save_image` can fail if the downloaded image's is corrupted
This image https://limonadier.net/wp-content/uploads/2019/09/IMG_1782.jpg appears to be corrupted, but returns a 200 in get_or_save_image function.
This causes django to raise an integrity error because its width is 0 pixel
psycopg2.errors.NotNullViolation: null value in column "width" of relation "wagtailimages_image" violates not-null constraint

Here is a potential fix https://github.com/torchbox/wagtail-wordpress-import/pull/146 (still in draft)
Let me know what you think of this approach
The example image seems to be unavailable now.
If you can complete the PR I'd be happy to review it. Thanks