How are image links generated?

Here’s a large image:

Its original link is:
Which is different from ![image|690x459](upload://nkjFnpawJaOanmycDbIXVG4jlkn.jpeg)

It will however, also have multiple optimized (for size and dimensions) versions.
Here’s one i got:

My questions are:

  • can i link somehow to the image via the “upload link”: ![image|690x459](upload://nkjFnpawJaOanmycDbIXVG4jlkn.jpeg) (eg: => i would expect that discourse will redirect me to the correct url afterwards.
  • how can i know what other links/versions of my image are created?
    eg. :
    • or maybe>>>2<<<X/a/3/a37df25f15fccd47dc543f3d5751d81cb61dbe6b.jpeg (this one doesnt exist)
    • other versions for retina, mobile, idk?

Since it’s a custom URL scheme, that kind of link will only work in a Discourse instance. Plus, if you want the link to actually work, it’ll need to be a link to an image on the same instance.

Why would you want to know? In Discourse, there are the “original” and a bunch of thumbnails (what we call optimized) which are mostly generated to support different pixel ratios.

1 Like

Well, i’m mostly interested in getting the original link.

Right now if Copy link address: image on my picture above i get

which even although has original in the name, is not the same as

My point is that if in the future discourse would change the cdn, all the links with the old cdn will be broken.

That’s the exact same file (cue the filename), except your 1st link is on the CDN and the 2nd link is on S3 (the storage we use here on meta).

1 Like

i just modified the post again (sry, i though you werent gonna answer that fast :blush: )

Click / tap the image and click / tap the download link at the bottom. Problem solved.



This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.