Patrick Hennis
Patrick Hennis

Reputation: 19

Wordpress adding extra slash to img url after http

Wordpress is adding an extra slash after http for img urls on my site
The image urls should look like a normal url but instead the image tags are like this:
http:///www.dreamteam.gg/wp-content/uploads/2016/01/crowd.jpg
notice the extra slash after http:
Not sure what would be causing this because these are links are not added by me, they are being made by three separate plugins and they all do this. Any help would be greatly appreciated. Thanks!

Upvotes: 0

Views: 886

Answers (1)

Patrick Hennis
Patrick Hennis

Reputation: 19

I couldn't find out what initially caused this issue but i put this script in the footer and it fixed all my image src links.

$('img').attr('src',function(i,e){
  return e.replace("http:///w","http://w");
})

Make sure you are importing jQuery into your page or this won't work

Upvotes: 0

Related Questions