wagtail-wordpress-import icon indicating copy to clipboard operation
wagtail-wordpress-import copied to clipboard

Allow image src without scheme and with external domain

Open fabienheureux opened this issue 3 years ago • 3 comments

Description

If images have a src attribute like //example.com/image.jpg, the imported url does not care about the domain and prepend the wagtail domain, hence leading to a 404 when downloading the image


  • Testing
    • [x] CI passes
    • [x] If necessary, tests are added for new or fixed behaviour
    • [x] These changes do not reduce test coverage
  • Documentation.
    • [x] Documentation changes are not necessary because they do not change how the importer usage

fabienheureux avatar Jan 21 '22 09:01 fabienheureux

Sorry for the noise, I pushed without running tests locally, again :roll_eyes:, they now pass.

@nickmoreton do you think you could take a look ? I am not very proud of this approach, especially the hardcoded file extensions, but I did not see how could we better handle these various cases.

fabienheureux avatar Jan 21 '22 11:01 fabienheureux

@fabienheureux Thanks we really appreciate the pull request.

@nimasmi I tested it out and is working OK. Would you take a look please and confirm happy to merge. Thanks

nickmoreton avatar Jan 24 '22 16:01 nickmoreton

@nickmoreton I am cleaning up old PRs.

Can I close this one ?

I hope I could have take @nimasmi comment into account but never found the time and I won't use this plugin in a near future.

fabienheureux avatar Jul 11 '24 21:07 fabienheureux