I want to display an image(attached to the page) with markdown. From what I looked up on the various portals, the format is:
![Alt text](/path/to/img.jpg)
But, this works for actual links to the image. How do i reference the image that is attached to the page itself.
It doesn't seem like the Wiki Markup converter has any smart check to determine whether an image is attached to a page or not, so you'll probably have to use the following format:
![](/download/attachments/<page_id>/<filename>)
Thank you for the answer. It worked. Really appreciate your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No problem :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For anybody else coming to this page, the format is actually
![](<contextpath>/download/attachments/<page_id>/<filename>)
so for Confluence Cloud users it would be
![](/wiki/download/attachments/<page_id>/<filename>)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, have tried this and it does not work for me?
Has something changed in the meantime?
Any ideas?
Would highly appreciate help
Works pefrectly with external links but not for internal:
External images should be avoided use the following format in markdown
BEST TO BE AVOIDED unless publicly available resources
Example:
![](https://i.ibb.co/ncPSnTF/sample-tech-specs-image.jpg)
For internal attachments - use following format
DOES NOT WORK UNFORTUNATELY:
![](/wiki/download/attachments/4238410304/sample_tech_specs_image.jpeg)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Seems that this answer is not valid anymore in 2024:
Any ideas of the reason - would highly appreciate help?
External images should be avoided use the following format in markdown
BEST TO BE AVOIDED unless publicly available resources
Example:
![](https://i.ibb.co/ncPSnTF/sample-tech-specs-image.jpg)
For internal attachments - use following format
DOES NOT WORK UNFORTUNATELY:
![](/wiki/download/attachments/4238410304/sample_tech_specs_image.jpeg)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wasn't I simply don't have this feature...
We workaround it by presenting images outside of markdown - but it's stupid...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, thanks for the tag.
When I originally wrote this answer, it was referring to the built-in markdown importer (Insert -> Markup, choose Markdown).
However, I see that according to this answer:
that @Milan Panic is using a third-party app to display Markdown (not sure which one).
To clarify why this does not work, it would help to explain that third-party apps run inside a frame and have their own URL (for example, https://example.com/markdown instead of https://mysite.atlassian.net). Therefore, if the markdown app does not use any extra processing to insert the confluence site name into the URL, it will try to render
https://example.com/wiki/download/attachments/4238410304/sample_tech_specs_image.jpeg
instead of
https://mysite.atlassian.net/wiki/download/attachments/4238410304/sample_tech_specs_image.jpeg
To fix this, you could just include the whole URL (not actually public, as it is your own site):
![](https://mysite.atlassian.net/wiki/download/attachments/4238410304/sample_tech_specs_image.jpeg)
instead of
![](/wiki/download/attachments/4238410304/sample_tech_specs_image.jpeg)
The only other option I can think of would be to contact the vendor of the markdown app and ask them to use a smart filling in of the URL when the site name is missing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I remember to have tried something - but was getting 403 with full URL but @Ramesh Maduranga please update us on the latest - maybe it will work...
![](https://mysite.atlassian.net/wiki/download/attachments/4238410304/sample_tech_specs_image.jpeg)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Milan Panic that suggestion did the trick for me.
@Stephen Deutsch Thank you for your suggestion. it worked perfectly! The images are now visible on the page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you inserting markdown in the "Insert Markup" menu or using a plugin to display it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Apurva,
Could you please let us know which product you are using (Confluence?), which type you are using (Cloud, Server), and if Server, which version?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.