How to show Shared images on a static HTML

I’m experimenting with sharing URLs and have successfully generated them. However, when I try to display these images in a client app using HTML, they don’t load—even though the image URLs work fine directly in a browser. I’m new to Storj and am unsure how to best approach this issue. Here’s the HTML template I’m using:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <img src="https://link.storjshare.io/s/jxo2yirvgy4f2g2x3q6fara7h35a/rvtn-test/2/2/image2.png" alt="Description of Image">
</body>
</html>

If you open the url of the image then you see that there is more shown than just the image.

You need to append ?wrap=0 to the url to directly access the raw image.

3 Likes

You can also use ‘/raw/’ in the URL instead of ‘/s/’

https://link.storjshare.io/raw/jxo2yirvgy4f2g2x3q6fara7h35a/rvtn-test/2/2/image2.png

3 Likes