How to host RAW images for free
Vic

Vic @victorio

About: Hi, I'm a 15yo h̵u̵m̵a̵n̵ low-quality fish, I know JS/TS and python, currently learning wtf is a decorator.

Joined:
Jan 9, 2022

How to host RAW images for free

Publish Date: Jun 7 '22
8 1

Hours ago I was searching for a way to host "raw" (with raw I mean an endpoint that returns an image) and most of them like azure blob storage are paid so I searched for free alternatives.

GitHub

  1. Create a new repo
  2. Upload files
  3. Drag your image
  4. On the image page, right-click it and click 'copy image link' Example

Telegra.ph

To host the images in the telegram server

  1. Go to telegra.ph
  2. Click on the camera icon and choose your image
  3. Right-click the image and 'copy image link' Example

You also can use the API using for example telegram-uploader.
Here's a snippet of how to use it

const { uploadByBuffer } = require('telegraph-uploader')
const fs = require('fs')

uploadByBuffer(fs.readFileSync('./image.png'), 'image/png')
  .then((result) => {
    console.log(result)
    /* {
         link: 'https://telegra.ph/file/...',
         path: '/file/...',
       } */
  })
Enter fullscreen mode Exit fullscreen mode

Sirv.com

It's a more advanced hosting, it provides benefits like

  • Custom domain
  • Folders
  • Custom name
  • Custom endpoint but also as it is a professional option it have limitations for the free plan, for example it only allow you to host 500mb for free and have a bandwidth of 2GB.

Thanks for reading :)

Comments 1 total

Add comment