Pictures are embedded as a picture, not as a hyperlink for downloading

Pictures should be implemented with a file name to be available for downloading. Instead this target the pictures are embedded as the picture itself consuming a lot of space, imagine you have hundreds presented to your users. What do I have to do to keep the file name instead of the picture?

Displaying images is usually what people want when they upload one. You can the right click to download.

I can’t think of a good solution. Perhaps you could have a category that used css to limit the size to a tiny thumbnail, but it would still push the whole image to the browser.

I think a theme component could add a tool that would upload an image as a link. I don’t know how to do that, though.

I don’t fully understand this request. What’s the goal here? To link to a picture instead of embedding it?

Consider a random image on the discourse homepage, the URL is https://www.discourse.org/a/img/homepage-5a.jpg.

If I paste that URL on a line by itself:

If I put text before the link: https://www.discourse.org/a/img/homepage-5a.jpg

Can you elaborate on what you’re trying to achieve, what the goal is?

1 Like

Hi Jeff, thank you for your reply. It is exactly the issue I am looking for. To enrich my links with additional text in front of the hyperlink to prevent the display of the picture I recognized that I am not able to modify my text modules anymore. Is that a feature or a matter of hierarchy? Take care, Dirk

What a lovely picture you chose! :grin:

2 Likes

here is a simple post-example copied from the editor, where I use a jpeg-file to be downloaded on request:

![So versteht sich cycling without age|690x494](upload://dFUfXQOjaBtY1G1CHQEWioh0awI.jpeg)

Question: Where do I have to place some text to prevent the pixel picture being displayed and to get just the hyperlink offered? The text ‘So verseht sich cycling withour age’ should remain. Please advise. Thank you.

Simply remove ! at the beginning to convert image to link. Markdown Reference

So versteht sich cycling without age|690x494

[So versteht sich cycling without age|690x494](upload://dFUfXQOjaBtY1G1CHQEWioh0awI.jpeg)

Ok so let me restate to be sure I understand your specific requirements:

  1. You must upload the image HERE, to Discourse, not somewhere else
  2. You must have the image appear as a link, not as an image

Here’s how:

  • I pressed the upload image button on the editor toolbar

  • I get ![hardrock|600x142](upload://hQp9APpwvC0hk45t7gEaFLf7j9o.jpeg) in the post

  • right click that image (in the preview, on the right hand side), and select “copy link” or “copy image address”

  • delete the ! and replace that text and URL in the link, like so

    ![hardrock|600x142](upload://hQp9APpwvC0hk45t7gEaFLf7j9o.jpeg)

    becomes

    [link to image](https://d11a6trkgmumsb.cloudfront.net/original/3X/7/d/7d117d4b713cc3bc7f98f5cb9801df93acd484aa.jpeg)

Here’s what it looks like in the post:

hardrock

and

link to image

To be honest Discourse isn’t really designed as a general purpose image linking host, so this is an unusual thing to do from our perspective. You are better off using a third party image host like imgur.com and linking the image that way:

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

Then all you need to know, is to put the < and > around the link so it doesn’t embed.

Also remember that a normal picture does offer a download link in addition to embedding:

First click or tap on this image :point_up_2:, then look for the download link at the bottom left near the name, dimensions, and filesize:

image

1 Like