Quite stressful to see thousands of pictures to just go away like that!This ruined my day, I regularly post in a couple of car forums on the progress on a couple of cars I'm working on. I've hundreds if not thousands of pictures hosted on imgur, linked to on those forum posts. My first thought was that I could try and rehost them with the same filename and then just change the first part of the URL in the forum posts (using find and replace). However it seems that all these image hosting sites add a random string between the hostname and the filename. Making it impossible to do a simple find and replace. The only thing I could think of is having a look-up table with the old vs new hosting URL and then a script to process each forum post (would have to save the contents of each post locally in bbcode).
Has anyone else looked into this and come up with a way to translate / transform / convert, imgur.com URLs to imgbb.com or postimage etc?
For images posted on other car forums, you should be able to use DuckDuckGo (web browser)'s proxy to quickly bypass the Imgur block. Just stick the imgur link at the end. I would not rely on imgbb.com or postimage for this, as some people here have reported issues with images being thrown into the ether, unless you have a paid subscription.
Using your image as an example - https://proxy.duckduckgo.com/iu/?u=https://i.imgur.com/ft7k1Er.jpg
In terms of find and replacing, not sure the best solution on that, but @Pho mentioned a script for the DuckDuckGo process above. It may speed up the process for you:
I also hacked a Tampermonkey script together (ChatGPT did because I was being lazy) which seems to work
- Install Tampermonkey extension for your brower
- Go to create new script
- Paste in this script and save
Code:// ==UserScript== // @name Imgur to DuckDuckGo // @description Replaces Imgur with DuckDuckGo image proxy links // @match *://*/* // @match *:///*/* // @run-at document-end // @version 1.0.0 // ==/UserScript== (function() { 'use strict'; const duckify = url => 'https://proxy.duckduckgo.com/iu/?u=' + encodeURIComponent(url); function replaceImgurLinks() { // Replace <img> sources document.querySelectorAll('img[src*="imgur.com"]').forEach(img => { img.src = duckify(img.src); }); // Replace <a> hrefs document.querySelectorAll('a[href*="imgur.com"]').forEach(a => { a.href = duckify(a.href); }); } // Run once initially replaceImgurLinks(); // Re-run whenever new content appears const observer = new MutationObserver(replaceImgurLinks); observer.observe(document.body, { childList: true, subtree: true }); })();
- You should be good to go
That being said, the DuckDuckGo proxy solution may also fail at some point, who knows. For a foolproof solution, self-hosting the images would be the best option, but obviously still a very time consuming process for the thousands of images you've already posted.
Last edited: