How to Host Images for a Website for Free
Learn where to host website images for free, how to get stable HTTPS URLs, and which limits matter for GitHub Pages, Cloudinary, ImageKit, and Imgur.
Short answer: Put images in a public GitHub repository and publish it with GitHub Pages for a small static or personal site. Use Cloudinary or ImageKit when people upload images or you need resizing, format conversion, and CDN delivery. Use Imgur only when you need a quick temporary link. In every case, upload the file, copy its HTTPS URL, and place that URL in an <img src="..."> element.
Choose the right free host
| Option | Best for | What you get | Limits and cautions |
|---|---|---|---|
| GitHub Pages | Personal sites, portfolios, documentation, class and hobby projects | Images versioned with your static site and served from an HTTPS Pages URL | Published site limit is 1 GB and the soft bandwidth limit is 100 GB/month. GitHub says Pages is not intended or allowed as free hosting for online businesses, e-commerce sites, or sites primarily facilitating commercial transactions or SaaS. |
| Cloudinary | Upload-driven sites that need transformations and CDN delivery | Dashboard, SDK, or upload API; responsive delivery and URL transformations | Free usage is credit-based. Production use is allowed within the 30-day free-credit allowance; monitor credits before importing a large library or serving high traffic. |
| ImageKit | Small projects that need managed storage, CDN delivery, and transformations | Connect existing storage or upload to ImageKit, then render transformed images and videos | The cited overview does not provide a complete quota table. Check the current plan for storage, bandwidth, transformation, and retention limits. |
| Imgur | A prototype, forum post, or one-off temporary embed | Web upload and a direct share link | The reviewed help page does not establish a production SLA, durable retention guarantee, or commercial hotlink policy. |
For a business site, check commercial-use, hotlinking, retention, export, and quota terms before treating a free tier as production infrastructure.
Method 1: Host images with GitHub Pages
GitHub Pages is the simplest route when the image files belong in your static site’s source tree. It is available with GitHub Free for public repositories. Follow GitHub’s Pages setup guide for the current interface.
- Create a public repository for the site.
- Add an image directory such as
images/. Use stable, lowercase filenames such asteam-photo.webp. - Compress large originals before committing. Keep the original in a local or separate versioned archive.
- Enable Pages in the repository’s Pages settings and choose the branch and folder containing the site.
- After publishing, open the generated HTTPS site URL and verify the image path.
<img src="https://YOUR-ACCOUNT.github.io/YOUR-REPOSITORY/images/team-photo.webp"
alt="Three teammates reviewing a design"
width="1200"
height="800"
loading="lazy">
Use a relative path such as /images/team-photo.webp when the image and page are in the same published site. A relative path survives a domain change more easily than a hard-coded host URL.
GitHub Pages limits and policy fit
- GitHub documents a 1 GB maximum published site size and a soft 100 GB/month bandwidth limit. See the GitHub Pages limits page for current details.
- Do not put passwords, payment details, or other sensitive transactions on Pages; GitHub explicitly warns against sensitive transactions.
- GitHub says Pages is not intended or allowed as free hosting for online businesses, e-commerce sites, or sites primarily facilitating commercial transactions or SaaS. Choose a service whose terms permit your business use.
Method 2: Use Cloudinary for uploads and transformations
Cloudinary is a better fit when an editor or visitor uploads files, when you need several sizes from one source, or when CDN delivery and URL transformations matter. Its free-plan documentation says the Free plan supports almost all features, does not require a credit card, and can be used in production within its 30-day free-credit allowance. Its image delivery documentation covers CDN delivery, responsive images, and URL transformations.
- Create an account and configure the upload method: dashboard, SDK, or upload API.
- Upload the source image and record its public ID.
- Generate a delivery URL using the provider’s documented transformation syntax.
- Place that HTTPS URL in your page and retain the public ID and original file in your asset inventory.
<img src="https://your-cloudinary-delivery-url.example/photo.webp"
alt="Descriptive text"
width="1200"
height="800"
loading="lazy"
decoding="async">
Do not routinely deliver the original file. Generate a width close to the rendered slot and serve modern formats where supported. Free credits are metered, so check the current allowance before importing a large library or opening the image URL to high traffic.
Method 3: Use ImageKit for a small managed project
ImageKit’s overview documentation describes a free plan for small-scale projects. You can connect existing storage, upload media to ImageKit storage, render images and videos, and apply transformations.
- Create an ImageKit account and choose whether your originals remain in existing storage or move to ImageKit storage.
- Upload an image through the dashboard or your application integration.
- Copy the resulting HTTPS delivery URL and add transformations for the dimensions and format your page needs.
- Keep an exportable copy of every original and check the current plan for quota details.
<img src="https://your-imagekit-delivery-url.example/photo.jpg"
alt="Descriptive text"
width="1200"
height="800"
loading="lazy"
decoding="async">
Method 4: Get a quick link from Imgur
Imgur’s upload help explains how to upload through its website and obtain share links, including a direct link after upload.
- Upload the image through Imgur’s web interface.
- Copy the direct image link, not only the page that displays the image.
- Paste it into your image element and test it in a private browser window.
<img src="https://i.imgur.com/EXAMPLE.webp"
alt="Descriptive text"
width="1200"
height="800"
loading="lazy">
Treat this as a prototype or temporary embed. The reviewed documentation does not establish production availability, durable retention, or a commercial hotlink policy.
Use any provider safely in HTML
<img src="https://your-provider.example/path/photo.webp"
alt="Descriptive text"
width="1200"
height="800"
loading="lazy"
decoding="async">
- Write alt text that conveys the image’s purpose. Use an empty
altfor purely decorative images. - Set intrinsic
widthandheightto reserve layout space and reduce cumulative layout shift. - Deliver a file near the rendered size; do not send a 5 MB original to a 320 px card.
- Use
loading="lazy"for below-the-fold images. Load the main hero image normally so it is not delayed. - Keep a local or versioned original and a mapping of source file, provider ID, and delivery URL.
Responsive images and format choices
When a managed service can generate several widths, let the browser choose a suitable file:
<img
src="https://cdn.example/photo-1200.webp"
srcset="https://cdn.example/photo-480.webp 480w,
https://cdn.example/photo-800.webp 800w,
https://cdn.example/photo-1200.webp 1200w"
sizes="(max-width: 700px) 100vw, 800px"
alt="Descriptive text"
width="1200"
height="800"
loading="lazy"
decoding="async">
Use WebP or another format your target browsers support, while retaining a fallback when your compatibility requirements need one. The exact transformation URL is provider-specific; use the provider’s current documentation rather than guessing parameter names.
How to decide in five minutes
- Static personal or documentation site: start with GitHub Pages if its size, bandwidth, and policy limits fit.
- Editors or visitors upload images: choose Cloudinary or ImageKit.
- Multiple sizes, format conversion, or CDN caching: choose a managed image service.
- One temporary embed: Imgur is the quickest path, with no assumption of production guarantees.
- Business or SaaS: read the provider’s commercial-use, hotlink, quota, retention, and export terms before launch.
Or skip the browser setup
If your goal is to capture a hosted page or image for documentation, previews, or a content pipeline, ScreenshotNeo returns a screenshot or PDF from one GET request. See the ScreenshotNeo API docs for parameters.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Cookie banners, newsletter popups, and chat widgets are removed before the shot. Bot checks, blank pages, failed loads, timeouts, and cache hits are never billed, and response headers identify the page verdict and billing status. An MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Broken image icon | The URL points to a hosting page, has a typo, or the file is private. | Open the exact URL in a private window, copy the direct HTTPS asset URL, and confirm the file is publicly readable. |
| 403 or hotlink error | The host blocks cross-site embedding or requires authentication. | Read the host’s hotlink policy, use its documented delivery URL, or move the asset to a provider that permits your use case. |
| Image works locally but not after publishing | A case-sensitive path, missing file, or incorrect Pages base path. | Match filename case exactly, commit the file, and inspect the published URL in browser developer tools. |
| Images are slow | Original files are too large or every page requests the largest variant. | Compress, resize to the rendered slot, use responsive variants, and lazy-load below-the-fold images. |
| Layout jumps while loading | No intrinsic dimensions are declared. | Add accurate width and height attributes or reserve space with CSS. |
| Free allowance disappears quickly | High-resolution originals, repeated transformations, or unexpected traffic consume metered credits or bandwidth. | Review usage, cache stable URLs, reduce dimensions, and set a budget alert where the provider offers one. |
| Images vanish after a provider change | Only delivery URLs were kept; originals or public IDs were not tracked. | Maintain an asset manifest and exportable originals so URLs can be regenerated. |
Performance, reliability, and cost checklist
- Measure the rendered dimensions and generate a matching variant.
- Prefer stable HTTPS URLs and verify cache headers in the browser’s network panel.
- Keep originals outside a temporary host and document every public ID.
- Watch GitHub Pages repository size and its soft bandwidth limit.
- Watch Cloudinary credits and ImageKit’s current quotas; free does not mean unlimited.
- Confirm commercial use and hotlinking rules before launch.
- Test missing files, provider outages, slow networks, and a disabled JavaScript environment where relevant.
FAQ
Can I host images on GitHub without GitHub Pages?
You can link to repository files, but Pages is the intended published-site workflow for a stable website URL. Keep the repository public and follow GitHub’s documented limits and policies.
Is a free image host unlimited?
No. Storage, bandwidth, transformations, credits, retention, and acceptable-use rules vary. Treat every free tier as a quota to monitor.
Should I store original files with the provider?
Keep an exportable local or versioned copy regardless of provider. It makes migration and URL regeneration possible.
What is the safest default for a new portfolio?
For a small static portfolio, GitHub Pages is usually the shortest path. Move to a managed image service when uploads, transformations, or higher delivery demands appear.
Can I use an image-host URL for a commercial website?
Only after checking the host’s current commercial-use and hotlinking terms. GitHub Pages has explicit restrictions for online businesses and transaction-focused sites, and Imgur’s reviewed page does not establish a commercial hosting guarantee.


