Post
Topic
Board Meta
Merits 9 from 3 users
Re: [Script] Imgur to TalkImg - automatically fix your broken images
by
TryNinja
on 12/11/2023, 16:34:38 UTC
⭐ Merited by LoyceV (6) ,Pmalek (2) ,vapourminer (1)
I was wondering if there is a quick way to add new image hosts to the code? A few years ago, I used vgy.me for images in some of my threads. Perhaps the script could be used to automatically replace those links as well. 
Yes, there is.

joker_josue is correct. The following line is used to grab the images and upload them to talkimg.

Code:
const imageLinkRegex = /https:\/\/i\.imgur\.com\/.*?\.(png|jpg|jpeg|gif)/gi

For vgy.me, you would probably use:

Code:
https:\/\/vgy\.me\/.*?\.(png|jpg|jpeg|gif)