Forums

Did the Imgur tag break?Thread is locked

Quick find code: 278-279-91-66024213

of 5
Blackwing
Nov Member 2012

Blackwing

Posts: 39,095Sapphire Posts by user Forum Profile RuneMetrics Profile
Was trying to upload an Imgur image to the forums, when I noticed that even with the correct format, the forums throws you the same error as if you used the wrong format:



Format used:

[imgur src=w9fRwep.jpg]

Hell, I tried using the full link afterwards as well, just to see if Jagex changed the format themselves intentionally:



Format:

[imgur src=https://i.imgur.com/w9fRwep.jpg]

But still no luck. Is it just me?
The Runescape Witcher
|| "Beware of the one called the Man of Glass. Seek salvation in the glass that can't be broken."

05-Jul-2018 18:32:11

Applejuiceaj
Nov
fmod Member
2011

Applejuiceaj

Forum Moderator Posts: 42,072Sapphire Posts by user Forum Profile RuneMetrics Profile
Last night when I noticed it going a little weird, I checked my browser’s network tab in its developer toolset and saw the attempt at loading the image returned a 403 Forbidden error from Imgur. Loading the image myself in its own tab worked fine though as you have found.

This was both with an image in a forum post and with an image added by a browser extension I use that runs when loading RSOF pages where the image is hosted on Imgur, so doesn’t seem too specific to something Jagex has done from my observation.

Edit: For those wondering what a 403 Forbidden error means, it means that the the server being communicated with (in this case, Imgur) understood the request from your browser, however it is refusing to fulfill it for some reason (refusing to provide the image content).

05-Jul-2018 19:24:28 - Last edited on 05-Jul-2018 19:28:42 by Applejuiceaj

Jokku23

Jokku23

Posts: 31,676Sapphire Posts by user Forum Profile RuneMetrics Profile
How sad! :(
………. ,*˜*, ……. ,•°*•, … You'll … ,•*°•, …… ,*˜*, .………
„*˜……“• •“………'·,ΈΈ,‘•°. thank .°•',ΈΈ,·'……..“• •“……˜*„
……………………………………………………………………..
The Bible of Rimmington
“‹„ΈΈ„ •°`' · . ,ΈΈ, . · ‘ … me later … ' · . ,ΈΈ, . · '΄°•„ΈΈ„›“

05-Jul-2018 19:25:08

Whos-Dr
Mar Member 2011

Whos-Dr

Posts: 19,897Opal Posts by user Forum Profile RuneMetrics Profile
So the issue here is that Imgur no longer allows the loading of images over http, in favour of https.

It should be a one-line change to the forum back-end.



Edit:
Disk caching be the bane of testing. (Meant to be disabled when I open dev tools, but Chrome updates so..)
Forum Community Helper
- Tech Support
Here to lend a paw with your tech issues.

05-Jul-2018 22:22:01 - Last edited on 06-Jul-2018 03:29:17 by Whos-Dr

Applejuiceaj
Nov
fmod Member
2011

Applejuiceaj

Forum Moderator Posts: 42,072Sapphire Posts by user Forum Profile RuneMetrics Profile
Whos-Dr said:
So the issue here is that Imgur no longer allows the loading of images over http, in favour of https.

It should be a one-line change to the forum back-end.


As much as I'd love to say that's the case, manually changing the image used in the author's opening post (using inspect element) to https still caused a 403 error to occur:

https://i.imgur.com/PAAOcjY.png

Interestingly enough, manually changing the HTTP request header to a different site (I used my clan's off-site forums) caused the image to retrieve successfully.

05-Jul-2018 22:44:17 - Last edited on 05-Jul-2018 22:51:42 by Applejuiceaj

Iceberg
Sep Member 2008

Iceberg

Posts: 19,304Opal Posts by user Forum Profile RuneMetrics Profile
Whos-Dr said:
So the issue here is that Imgur no longer allows the loading of images over http, in favour of https.

It should be a one-line change to the forum back-end.
Interesting how this happens the same day Chrome rolls out version 68, resulting in areas of the website like the forums displaying a red 'not secure' icon. (something I really hope is on the top of the web team's agenda right now)
….…
_|―――|_

...……
( '
v
' )
……..
Iceberg

>;--
(
…
:
…
)
--<
Community Helper

05-Jul-2018 23:56:01

Whos-Dr
Mar Member 2011

Whos-Dr

Posts: 19,897Opal Posts by user Forum Profile RuneMetrics Profile
Welp, for the time-being..

{

function loadImageAnonymous(imageElement) {
const url = imageElement.dataset.url || imageElement.src;

imageElement.addEventListener("error", function(e) {
fetch(url, {referrerPolicy: "no-referrer"})
.then(response => response.body)
//This bit isn't mine
.then(body => {
const reader = body.getReader();

return new ReadableStream({
start(controller) {
return pump();

function pump() {
return reader.read().then(({ done, value }) => {
// When no more data needs to be consumed, close the stream
if (done) {
controller.close();
return;
}

// Enqueue the next data chunk into our target stream
controller.enqueue(value);
return pump();
});
}
}
})
})
.then(stream => new Response(stream))
.then(response => response.blob())
.then(blob => URL.createObjectURL(blob))
//the rest is though
.then(url => imageElement.src = url);

e.preventDefault();
});

}

Array.from(document.querySelectorAll(".bb-imgur" )).forEach(loadImageAnonymous);

}
Forum Community Helper
- Tech Support
Here to lend a paw with your tech issues.

06-Jul-2018 03:46:41 - Last edited on 06-Jul-2018 03:47:18 by Whos-Dr

Quick find code: 278-279-91-66024213Back to Top