External image attachments

This post is made because of something I noticed on a reply on a topic by me. In this reply I’ve added a GIF which was hosted on a external website.
A few minutes after posting it the system downloaded the GIF to the Roblox servers and replaced the original external hosted version with the local copy.
This resulted in a compressed and low quality GIF which is harder to read.

For reference, here is the GIF where I am talking about before and after the local copy by the system.
Before (original): click here
After (local copy and compressed): click here

I think the Developer Forum system should stop with replacing external hosted images to local copies or the compression of images should be lowered (or removed).

6 Likes

What’s the actual problem? Both gifs are perfectly legible and the “after” is desired that way because it takes less memory and bandwidth.

4 Likes

Well, sometimes I need to clarify stuff with a GIF and then it is not practical if the image is grainy.

I understand that Roblox wants a low memory usage of images, but when the image is hosted on a external server I don’t see a reason why Roblox has to copy it to their servers.

I think if the file size is large enough, it will not do this and just embed the external source. Have you had this issue occur with larger/longer gifs as well? (can you link to an example post with one?)

It keeps downloading local copies, no matter the size.

System changes it with the following message:

You can re-edit your post to use an external copy instead of a local copy after the system edit.

The intention with downloading local copies is to reduce load time, but it can cause posts’ formatting to break in rare situations.

Sorry for bumping this topic but I think we still need that feature. There are some important reasons why external images should NOT be downloaded locally (at least in some cases):

Downloading local copies breaks HTML

This bug only affects external images (not uploaded directly to DevForum)

Let’s say you want to center your images then you should do something like this:

<div align="center">
  <img alt="My Image" src="https://link/to/some/image.png">
</div>

After saving it everything will break, take a look at this example:


(Before and After)

That’s because DevForum creates Markdown images regardless if they were previously inside HTML. And then guess what? Markdown won’t render inside HTML.

Support for API

Because of downloading local copies it is currently impossible to create dynamic images. I created stats API from my plugin but I can’t even use it on DevForum as link should be called every time you open or refresh the page to get latest data. Take a look how it should look like on this GitHub repo. Here is also screenshot of that:


And there is link to one of these badges and my custom API response required for that badge.

Also @Automationeer isn’t right. After you edit your post new images will be replaced with local copies again after 2 minutes or something. Here is the proof:

2 Likes

Could you send some examples where the compression actually matters when looking at the resulting posts before/after? Feel free to private message me if that is more convenient.

Does this happen on other Discourse-based forums?

This seems like a niche use case and there are some security/layout difficulties with dynamic images like this. It is preferred that you do not pursue this and treat forum content as static.

I have made a topic in Discourse like this :slight_smile:

You should put two new lines in between the div and the image.

<div align="center">

![Alt Text](img://source)

</div>
1 Like

Not sure as I only use this and Unreal’s forum. Though the problem only occurs when images were added in HTML, not in Markdown.

Sure, I guess I have no choice.

That’s not the problem here.

Example I provided works perfectly fine. This becomes problematic once system automatically downloads local copies of the images and updates post in Markdown, even though it was in HTML.

Here is what I mean:

I’m aware of this, it’s because the upload:// directive is baked into markdown and therefore cannot be included in HTML output. The workaround is to surround your image with new lines, so that when it is converted to markdown, the surrounding HTML will be preserved; this is standard in GFM (which afaik is what Discourse uses).

1 Like

Just to close out the topic, we do not support previews for external sources for security reasons, unless they are from a set of known providers. Apologies for the inconvenience.

2 Likes