How can I serve images from my storj account?

Hey everyone!
It’s my first time trying Storj. I’ve a few images that I want to show on my websites without storing them on my shared hosting server. Is it possible somehow to keep the images on Storj and get a public link of the images that can be directly entered into the <img src="" /> tag?
Any help is really appreciated.

Hi @DezyNation
There are a number of ways you can do this.

The simplest is using the web interface and then for each image you can generate a sharing link which can be mapped to the raw image. Linksharing Service | Storj Docs

A more advanced option is using the uplink share command to a single folder with all the images contained within - share | Storj Docs

Hello @DezyNation,
Welcome to the forum!

You may also take a look on: Host a Static Website | Storj Docs

I checked the documentation but there’s no such feature to share only images. It’s giving me a storj link (jtjtjtjuy-min.jpg | Storj DCS)

This link can’t be used in src attribute of img tag.
This link is opening a storj page👇



But I want my image only.
Please help.

Try using this img tag and tell me if it works.

https://link.eu1.storjshare.io/raw/jui5ustxavbr2clypzb3juffhc2a/edulec-assets/jtjtjtjuy-min.jpg>

As @alexey suggested below the correct link would be

<img src="https://link.storjshare.io/raw/jui5ustxavbr2clypzb3juffhc2a/edulec-assets/jtjtjtjuy-min.jpg">

without the eu1 region mentioned.

2 Likes

It worked! Thanks a lot, you really saved my day (in fact a whole week):heart:
But how did you know the file is being stored in European Union’s server?
Will this link.eu1.... always work? Ho can I get this link for my other images?

1 Like

Yes, it will always work. Replace the /s/ with /raw/ in your share links.

2 Likes

It’s better to use link.storjshare.io instead of regional one, because the routing depends on the customer’s location. If you hardcode the region, the customer will always use this region, even if they are form Australia or Americas.

4 Likes