MySQL query to change all non-secure Imgur links to https Imgur links

I have an add-on by TickTackk that stops my image proxy from unnecessarily proxying images that come from HTTPS sites.

I looked at the proxy log today and I realized I have countless images proxied (that aren't dropping out since they keep getting crawled by bots) that are from http://i.imgur.com

Can anyone help me write a MySQL command to search the posts and signatures to replace any http://i.imgur.com/ images to https://i.imgur.com (with the difference being only http vs https)?

------

Also, might as well ask here while I'm at it. I woke up today to find that I can't embed images. My users are complaining. Does anyone know where I might start investigating this issue? I've tried disabling that add-on to see if it's a problem, but it's not.

Thanks
 

Brogan

XenForo moderator
Staff member
This will change the post content:
SQL:
UPDATE xf_post SET message = REPLACE(message,'http://i.imgur','https://i.imgur');

Take a backup first and test on a duplicate test installation if possible.
 
This will change the post content:
SQL:
UPDATE xf_post SET message = REPLACE(message,'http://i.imgur','https://i.imgur');

Take a backup first and test on a duplicate test installation if possible.

Thank you. I can confirm to anyone else searching that this did work. (Test it on your staging server first!)
 
Top