FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
dcm31
dcm31Imagetourl
Public
Like
Imagetourl
Home
Code
2
README.md
H
image-host.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
5/16/2025
Viewing readonly version of main branch: v4
View latest version
README.md

Image Self-Hosting Service

This is a simple web application that allows you to take external image URLs and host them in Val Town's blob storage.

Features

  • Input any public image URL
  • The image is downloaded and stored in Val Town's blob storage
  • A new, self-hosted URL is generated for the image
  • Preview the hosted image directly on the success page

How It Works

  1. The application downloads the image from the provided URL
  2. It stores the image in Val Town's blob storage with a unique key
  3. It generates a permanent URL that you can use to access the image
  4. The image is served directly from Val Town's infrastructure

Technical Details

  • Built using Val Town's HTTP endpoints
  • Uses Val Town's blob storage for image persistence
  • Handles various image formats (JPEG, PNG, GIF, WebP, SVG, BMP)
  • Preserves the original content type of the image

Usage

  1. Enter a valid image URL in the input field
  2. Click "Host Image"
  3. On the success page, you'll see:
    • The original image URL
    • The new self-hosted URL (which you can copy)
    • A preview of the hosted image

Limitations

  • Only works with publicly accessible image URLs
  • There may be size limitations based on Val Town's blob storage constraints
  • Only supports common image formats (JPEG, PNG, GIF, WebP, SVG, BMP)
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.