Pages:
Author

Topic: [Script] Imgur to TalkImg - automatically fix your broken images - page 2. (Read 2264 times)

legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
Is that a 138meg .gif   Cheesy     As awesome as I think memes are, I think we can leave behind file formats from 1987 (36 years old in 9 days) that have been superseded.  Definitely deserves a cap, Imgur I had thought did this a while back but not retrospectively perhaps; probably its showing up as an disproportionate load to bear.
The fact that it's 36 years old and still in use, means it's a good thing to keep. I recently tested it, and for the right images it still produces smaller files than .png. So let's keep .gif Smiley
STT
legendary
Activity: 4102
Merit: 1454
Is that a 138meg .gif   Cheesy     As awesome as I think memes are, I think we can leave behind file formats from 1987 (36 years old in 9 days) that have been superseded.  Definitely deserves a cap, Imgur I had thought did this a while back but not retrospectively perhaps; probably its showing up as an disproportionate load to bear.
legendary
Activity: 2758
Merit: 6830
Imgur images are broken again! Feel free to use the script if you haven't already.
legendary
Activity: 1862
Merit: 5154
**In BTC since 2013**
You decide: here's the 10,000 largest images. Check a few of them, and see if they're worth saving. Judging by the file size, I already see a few duplicates.

If you allow images >2.5MB, you shouldn't provide [img]-tags for them, and add a warning that it can only be linked.

Yeah... I think it's better to guarantee the limit, for a better forum experience.
Larger images are linked by the forum as external links/files, so each one manages this as they see fit.

Perhaps if in the future I manage to add some warning element in this regard, I will try to do so.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
What size could be reasonable to allow uploading? Do you think 5MB would be acceptable?
@LoyceV based on your collection, what value do you think is reasonable?
You decide: here's the 10,000 largest images. Check a few of them, and see if they're worth saving. Judging by the file size, I already see a few duplicates.

If you allow images >2.5MB, you shouldn't provide [img]-tags for them, and add a warning that it can only be linked.
legendary
Activity: 1862
Merit: 5154
**In BTC since 2013**
I know that. I believe the image was only linked (not embedded through the [img] tag), so it wasn't using the forum proxy. The script looks for all links (embedded or not), so it was trying to upload it anyway.

I still think it's worth uploading it, since imgur could delete our images at any time.

Right... I hadn't thought about that perspective.

What size could be reasonable to allow uploading? Do you think 5MB would be acceptable?
@LoyceV based on your collection, what value do you think is reasonable?
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
the image was only linked (not embedded through the [img] tag)
~
I still think it's worth uploading it, since imgur could delete our images at any time.
Good point, I only downloaded the embedded images, but links might contain some forum history too.
legendary
Activity: 2758
Merit: 6830
Just remember that the limit is the forum proxy itself. TalkImg can be any size, but as it wouldn't work on the forum, it's not worth uploading. Roll Eyes
I know that. I believe the image was only linked (not embedded through the [img] tag), so it wasn't using the forum proxy. The script looks for all links (embedded or not), so it was trying to upload it anyway.

I still think it's worth uploading it, since imgur could delete our images at any time.
legendary
Activity: 1862
Merit: 5154
**In BTC since 2013**
I removed it because most .gif links posted by me were hitting TalkImg's size limit... but I guess it makes sense to include them by default anyway.

Just remember that the limit is the forum proxy itself. TalkImg can be any size, but as it wouldn't work on the forum, it's not worth uploading. Roll Eyes
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
I removed it because most .gif links posted by me were hitting TalkImg's size limit...
In all files I've downloaded from imgur, about 5% of the .gif files is above the size limit.
legendary
Activity: 2758
Merit: 6830
If you add .gif you have everything Smiley
I removed it because most .gif links posted by me were hitting TalkImg's size limit... but I guess it makes sense to include them by default anyway.

From:
Code:
/https:\/\/i\.imgur\.com\/.*?\.(png|jpg|jpeg)/gi

To:
Code:
/https:\/\/i\.imgur\.com\/.*?\.(png|jpg|jpeg|gif)/gi
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
It currently only matches imgur links ending with png, jpg, jpeg.
If you add .gif you have everything Smiley
legendary
Activity: 1862
Merit: 5154
**In BTC since 2013**
Yes, you can. I've added a imageLinkRegex variable at the top. It currently only matches imgur links ending with png, jpg, jpeg.

Thanks for the tip.
As soon as I have some time I will test it and give feedback.  Wink
legendary
Activity: 2758
Merit: 6830
Imagine that I have images on Imgbb and I want to transfer them to TalkImg, is it possible?
Forgot to reply this one, sorry.

Yes, you can. I've added a imageLinkRegex variable at the top. It currently only matches imgur links ending with png, jpg, jpeg (edit: and gif).

If you want to match ONLY imgbb images, you can use:

Code:
/https:\/\/i\.ibb\.co\/.*?\.(png|jpg|jpeg|gif)/gi

If you want to match BOTH imgbb and imgur images:

Code:
/https:\/\/i\.ibb\.co\/.*?\.(png|jpg|jpeg|gif)|https:\/\/i\.imgur\.com\/.*?\.(png|jpg|jpeg|gif)/gi
legendary
Activity: 2758
Merit: 6830
It's still same to me, neither link works nor script, why isn't there response to this yet?
It's just a github file which is valid and working. The issue is on your end (either your browser or your connection?).

But anyways, I edited the script and put the link behind my proxy. See if it works: https://proxy.ninjastic.space/?url=https://raw.githubusercontent.com/mathiasbynens/emoji-test-regex-pattern/main/dist/latest/javascript.txt
hero member
Activity: 2520
Merit: 952
I'm getting this error.


Run it again. The script requires loading a full emoji regex to match and not break them: https://raw.githubusercontent.com/mathiasbynens/emoji-test-regex-pattern/main/dist/latest/javascript.txt

When if I try to open mentioned link manually, I get same timeout error in browser.

It's still same to me, neither link works nor script, why isn't there response to this yet?
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
TalkImg API returned an error, let me know if you're still getting this.

No. I've ran it again right after that and it managed to handle all the pages of my history without errors (well, excepting a few too large images and a couple of locked topics, but it's okay).
Sorry for the late answer and thanks.
hero member
Activity: 2520
Merit: 952
I'm getting this error.


Run it again. The script requires loading a full emoji regex to match and not break them: https://raw.githubusercontent.com/mathiasbynens/emoji-test-regex-pattern/main/dist/latest/javascript.txt

When if I try to open mentioned link manually, I get same timeout error in browser.
legendary
Activity: 2758
Merit: 6830
I'm getting this error.


Run it again. The script requires loading a full emoji regex to match and not break them: https://raw.githubusercontent.com/mathiasbynens/emoji-test-regex-pattern/main/dist/latest/javascript.txt

I've just got a different one:


TalkImg API returned an error, let me know if you're still getting this.
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
I've just got a different one:

Pages:
Jump to: