0

I'm making migration from wix platform to wordpress. So, a part of content was copied using CTRL+C CTRL+V, and images link look ugly. I need to make them internal from externals, but first of all I need to change links. They should normal image links. So, what I'm talking about.

Image link in many post looks like https://static.wixstatic.com/media/ba136b_54cc44b912d348c49bbae6c3f44b02f5~mv2.jpg/v1/fill/w_465,h_348,al_c,q_80,usm_0.66_1.00_0.01/ba136b_54cc44b912d348c49bbae6c3f44b02f5~mv2.webp

but better if it would be https://static.wixstatic.com/media/ba136b_54cc44b912d348c49bbae6c3f44b02f5~mv2.jpg
Change them manually is bad idea, because I have around 100-150 posts and in each I have about 10 such images.

The solve that I see is to make an SQL-query, that would cut useless part of link for me. But I can't imaginate how it should look.

  • 1
    is the information after /v1 always the same or is this randomly generated from wix? – rudtek Mar 24 '17 at 18:53
  • The solution is to export wp_post table as sql, then edit it with text editor like Sublime, Notepad++. To replace such links need to use regular expressions. Need to find regular expression like .jpg.*.webp and replace it with .jpg example And than delete this table in db and import it with changes. – okonik Mar 25 '17 at 4:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.