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).
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?)
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:
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:
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.
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.
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).
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.