How do i link an uploaded image to a url?

I can’t seem to figure out how to upload an image and then make it a hyper link. I have my own product images I want to link back to amazon. But I’d rather not use their shitty markup from their site stripe.

1 Like

You can drag and drop an image into the editor, copy the newly created image path and then copy that to add it to text as a link. The image will remain at that path after you’ve deleted it from the page content.

If you’re wanting to make an image be clickable to a page then you’ll need to use the markdown or html card:

With markdown:

[![My image](/path/to/image.jpg)](https://websiteaddress.com) 

With HTML:

<a href="https://websiteaddress.com"><img src="/path/to/image.jpg" alt="My image"></a>

The image is a data url when I upload it.

A data url? As in when you upload the image to Ghost it turns into a data url, or that you have it as a data url and you want to upload that?

The data url will only appear when first uploading an image, the editor uses them to show the preview whilst uploading and continues to use it for display after upload to avoid flashing of content. You can either refresh, or exit the editor and re-enter it to see the URL.

However, if you are using the markdown card as it sounds like you are then you can drop images onto the markdown card to upload+insert the markdown img markup automatically so won’t need to deal with data urls.

2 Likes