Skip to content
PictureToLink logoPictureToLink
Menu
Image Sharing

What Is Hotlinking? Is It OK to Hotlink Images?

Hotlinking means displaying an image stored on someone else's server. When it is fine, when it is bandwidth theft, and how image hosts allow it.

By Ahsan Khowaja (CEO) · · 7 min read
Facts checked against official sources on

On this page

Hotlinking means showing an image on your page by pointing at the file on someone else's server instead of hosting your own copy. Each time your page loads, their server sends the picture and they pay for the bandwidth. My rule is short. Hotlink from places that offer a link for the purpose, which is what image hosts are for. Don't take files from an ordinary website without asking, because that's rude and often blocked.

What is hotlinking, in code?

Every image on the web has an address. An image tag tells the browser to fetch the file from whatever address you give it:

<img src="https://another-site.example/photos/sunset.jpg" alt="Sunset over the bay">

If that address is on a server you don't control, you're hotlinking. Your page never holds the file. It holds one line of text, and each visitor's browser goes to the other server to collect the picture. You'll also see it called inline linking or direct linking. Site owners who dislike it call it bandwidth theft.

Two things get confused with it. A normal text link that sends readers to another site's page is everyday web behavior, and nobody minds it. Downloading an image and uploading it to your own server is different again: you serve the file yourself, so the bandwidth problem goes away, but any copyright question stays exactly where it was.

Uploading a picture to an image host and using the direct link it gives you is hotlinking in the technical sense. It comes with permission, though. The host exists for that.

Is pasting an image address hotlinking?

That depends on what happens to the address after you paste it. When it stays a link that people click, the picture opens from its own site and you've only linked to it. When the forum, chat app or page editor turns the address into a picture shown in place, the other site's server is supplying the file for your post. That's a hotlink, even though you never wrote an image tag.

Why site owners dislike hotlinking

Bandwidth is the main complaint, and the sums show why. One of our test photos is a 3024 × 2016 JPG of 1.6 MB. Put that file in a forum thread that gets opened 1,000 times and the owner's server sends out 1.6 GB for a page that isn't theirs. A busy thread can be opened far more often than that.

The owner gets nothing back. Visitors see the image on your page and never visit the site it came from, so there's no ad view and no credit. Control goes too, since the image can appear next to content its owner would never endorse.

It's fragile for you as well. If the owner renames, moves or deletes the file, your page shows a broken image. If they swap the file, your page shows whatever they put in its place. Wikimedia Commons, which does allow hotlinking, still advises against relying on it for that reason: a hotlinked file could be changed, renamed or deleted, while on your own server you control what is served.

How do sites block hotlinking?

Many sites switch on hotlink protection. When a browser asks for an image, it usually sends a Referer header that says which site the request came from. The server reads it, and refuses or replaces the image when the request comes from a domain it doesn't recognize.

Cloudflare's documentation says its Hotlink Protection "denies access to requests when the HTTP referer does not include your website domain name (and is not blank)", and that it covers gif, ico, jpg, jpeg and png files.

Blank referrers are let through. That detail explains the most common wrong conclusion about hotlinking: "the image opens in my browser, so the link is fine." A protected image can open when you paste its address straight into the browser bar and still fail on other people's pages. Embedded on a page, the same address is requested with that page's site named in the header, and the server refuses it. So a link that works in a new tab hasn't told you whether it will work inside an image tag on a different domain.

Browsers now reveal less in that header than the full page address. MDN notes that the default policy, strict-origin-when-cross-origin, sends only the origin for cross-origin requests: https://your-site.example/, without the page path. The server needs no more than that to tell which site is embedding its images.

Are the images yours, and do you want to keep other sites from using them? Our guide to hotlink protection covers the options.

When the owner says it is. Four situations count as a yes.

The clearest is an image host built for embedding, where pasting the direct link into a forum, a README or an email is the intended use. Your own files on a service you control are fine too, such as your own cloud storage bucket or content delivery network. Official embed codes are the third case, because a service that hands you an embed snippet has permitted it by design. Last come sites that explicitly allow it. Wikimedia Commons says hotlinking from its servers is allowed, though not recommended, and that license conditions such as attribution still apply when you do.

The no list is shorter. A site's terms may forbid it. Hotlink protection may be switched on, which is a sign the owner doesn't want it. And you may have no right to use the image at all, because hotlinking doesn't change who owns a picture.

One gray area is left. Your page gets heavy traffic and the image sits on a small personal site with no protection. Nobody may stop you, but you'd be pushing your costs onto someone else. Ask first.

Which image hosts allow hotlinking?

To show a picture on a forum, a blog or in a document without running your own server, use a host whose direct links are meant to be embedded. This is what four of them say on their own pages:

HostWhat its own pages say
PictureToLinkGives a direct link ending in the file extension, plus HTML, BBCode and Markdown codes for embedding
PostimagesOffers link options labeled for websites and forums in its FAQ
ImgBBIts upload page offers direct image links, BBCode and HTML thumbnails, and its paid Pro plan lists "Direct Linking" among its features
Wikimedia CommonsAllows hotlinking but advises downloading instead, and license terms still apply

PictureToLink is our product, so weigh that row accordingly. Our direct links are made to be embedded and we don't block other sites from displaying them. Retention is the weak point. An image is removed after 12 months without views, or earlier if you set an auto-delete time, and we can't promise permanent hosting. For an image that is a lasting part of your own website, upload it to that website. It's more reliable than a free host, ours included. Our comparison of the best free image hosting sites covers more hosts and their limits.

Not every link a host gives you is an image address. Share pages and viewer links open a web page around the picture, and a web page won't display inside an img tag, a BBCode image tag or a Markdown image. Our guide to direct links, viewer links and embed codes explains which one to use where. Reddit treats links the same way: a link to a page shows as a link, and a direct link shows the picture, as how to post images on Reddit explains.

No. This part is general information, not legal advice, but the principle is plain: displaying someone's photo by hotlinking still uses their work. The US Copyright Office's guidance on using someone else's work states that "if you use a copyrighted work without authorization, the owner may be entitled to bring an infringement action against you."

Rules and exceptions differ by country. In the UK, the government's page on exceptions to copyright lists the situations where permission is not needed. If a specific use matters to you or your business, get proper legal advice.

Credit works the same way. Where a license such as Creative Commons requires attribution, give it next to the image. Wikimedia Commons notes that hotlinking does not remove that obligation.

What to do instead of hotlinking

Someone else's image? Ask. They may let you host your own copy, or give you a link they're happy for you to use.

For a picture of your own, upload it and copy the direct link or HTML code. Then you're embedding a file from a host that expects it. A smaller file costs every reader less as well: resized to 1280 pixels wide and saved as WebP, the 1.6 MB test photo above came out of our upload pipeline at 180 KB, which is 89% smaller.

Either way, keep a copy of the original and write meaningful alt text. When you depend on an image you don't control, the alt text is what lets readers follow the page if the picture disappears.

Image Sharing

Markdown Image Syntax: READMEs and Docs

The Markdown image syntax with copy-ready examples, from alt text to sizing and GitHub README images, plus how to host the image file.

· 7 min read
Image Sharing

How to Make a Picture a Clickable Link

How to make a picture a link in HTML or an email, with copy-ready code. If the image is only on your device, host it first; we show how.

· 9 min read
Image Sharing

BBCode IMG Tags: Post Images on Forums

How the BBCode [img] tag works, how to resize and link images in forum posts, and why your image shows as a broken link, with copy-ready examples.

· 7 min read

Related calculators