Why an Image URL Does Not Work in HTML

Your image URL usually fails for one of these reasons:
- You copied a webpage link instead of the direct image URL.
- The image is private, expired, deleted, or restricted.
- The host blocks hotlinking or the requesting website.
- The URL returns the wrong content type or unsupported response.
Start by opening the link in a private browser window. If you see a webpage, login prompt, or error instead of only the image, the address is not ready for a public website embed.
You copied the preview page
This is the most common cause.
The copied URL may open a page containing the image:
https://example.com/view/photo
Your website needs the actual file:
https://files.example.com/photo.jpg
A browser can display both. An HTML image element can use only the response that returns image data.
How to check it
Open the URL by itself.
Right-click the visible image and inspect whether “Open image in new tab” produces another address.
A Link Doctor check can also report whether the original URL returns HTML or an image.
The file is private
The image may appear while you are logged in to the hosting service.
Other people may receive:
- A login screen
- An access denied response
- A blank image
- A permission error
Test the address in a private browser window.
When it does not work there, the public website will probably not be able to access it.
Do not try to bypass a private file. Change its sharing setting or upload an authorised public copy.
The link has expired
Some direct URLs are temporary.
They may contain tokens and expiry values:
expires=1720000000
token=example
signature=example
The image can work during testing and fail later.
Expiration Check: Signed URLs from AWS S3, Google Cloud Storage, or private API endpoints have built-in expiry parameters. These URLs work temporarily but will fail eventually.
This commonly happens with signed cloud-storage addresses, temporary API URLs, and internal image delivery systems.
Google Photos API base URLs are one example. Google states that they remain active for 60 minutes.
Use a hosting link that is intended for continued public delivery.
The image was deleted or moved
A direct URL depends on the original file.
The address can stop working after:
- The owner deletes the image
- The file is moved
- The account is closed
- The host removes the content
Check the HTTP response.
A 404 response usually means the file or route was not found.
The host blocks hotlinking
Hotlinking happens when one website embeds a file hosted by another service.
Some hosts allow it. Others block requests based on the referring domain, account plan, or traffic rules.
The image may open directly in a new tab but fail inside your website.
This can happen because the host sees a different referrer when the request comes from your page.
Use a host that permits your intended embedding workflow or add your domain to the file’s allowlist.
The host reached a bandwidth limit
An image host may temporarily stop public delivery after excessive traffic or downloads.
Dropbox documents that sharing can be interrupted after bandwidth limits or too many downloads are reached.
The owner may not notice the problem until another person reports the missing image.
Check the hosting dashboard and current usage.
The URL redirects
A URL may pass through one or more addresses before reaching the image.
Normal browsers follow redirects automatically.
Some applications, import tools, email systems, or API clients do not follow them correctly.
Dropbox raw=1 links are an example of media links that use an HTTP redirect before delivering supported content.
Use the final direct URL when the host permits it, or use a service with a stable media route.
The server returns the wrong content type
An image URL should return an image MIME type such as:
image/jpeg
image/png
image/webp
image/gif
A URL can end in .jpg and still return:
text/html
This may happen when the server sends an error page, preview page, or security screen.
The file extension alone is not enough.
Inspect the response Content-Type.
CORS is affecting browser processing
CORS mainly controls whether frontend JavaScript can access a response from another origin.
A normal image may display inside <img> while JavaScript is unable to read its pixel data or use it safely inside a canvas. MDN explains that cross-origin canvas access requires suitable CORS configuration from the image server.
This problem appears in:
- Image editors
- Canvas export tools
- Browser screenshot apps
- JavaScript image processors
The image host must send a suitable Access-Control-Allow-Origin response for the required use.
The website uses HTTP and the image uses another security setup
Modern websites normally use HTTPS.
Loading insecure HTTP assets inside an HTTPS page can be blocked as mixed content.
Use an HTTPS image URL.
Also check whether the image host has a valid SSL certificate.
The image format is unsupported
Modern browsers support common formats such as JPEG, PNG, GIF, WebP, and SVG.
A specialised format may not display in every browser or website builder.
Convert the file to a web-supported format before embedding it.
For photographs, JPEG or WebP may suit the job. PNG is useful when transparency is required.
The URL contains spaces or invalid characters
A manually created URL may contain spaces, unescaped characters, or copied punctuation.
For example:
https://example.com/my photo.jpg
The correct encoded address may be:
https://example.com/my%20photo.jpg
Copy the URL from the hosting service rather than typing it manually.
Your HTML syntax is incorrect
Check the image element:
<img src="https://example.com/photo.jpg" alt="Photo">
Common mistakes include:
- Missing quotation marks
- Using
hrefinstead ofsrc - Copying an incomplete URL
- Placing text inside the address
Open the browser developer console to check the error.
The website builder does not accept external images
Some platforms allow only uploaded files from their own media library.
Others require a direct image link and reject preview pages.
Check whether the field expects:
- A local upload
- A direct URL
- An embed code
- An HTML block
Use the input type required by the platform.
A step-by-step check
- Open the link in a private browser window to bypass login sessions
- Confirm that the URL returns only the image file with no page layout around it
- Ensure there are no temporary signed expiry parameters
- Verify the server returns an image Content-Type header
- Test the link inside a basic HTML image tag on a blank page
When the image fails here, the problem is probably with the link or hosting response rather than the original website design.
How Link Doctor helps
Media2URL Link Doctor checks supported public URLs for:
| Diagnostic | What it reveals |
|---|---|
| HTTP status | Working, blocked, or missing |
| Content type | Image or webpage |
| Redirect path | Addresses followed |
| CORS headers | Browser-access information |
| Expiry patterns | Possible temporary link |
| Final URL | Actual delivery destination |
After the check, you can re-host a public file that you own or have permission to use.
Final answer
An image URL can open in your browser and still fail on your website.
The most common reason is that you copied a preview page instead of the actual image file. Private access, expiry, redirects, hotlink blocks, bandwidth limits, and incorrect response headers can also cause the failure.
Test the address outside your account session and confirm that it returns an image response before publishing it.
Frequently Asked Questions
What is an image URL?
An image URL is the web address of an image file. When a browser, app, editor, or page builder needs to display that image, it uses that address to fetch the file from its server. It is not the image itself, it is the location where the image lives.
What does an image URL look like?
A typical image URL has four parts: the protocol (https://), the domain (example.com), the folder path (/images/), and the filename (photo.jpg). Real CDN paths may include extra parameters or random strings, but the essential structure stays the same.
Where do you use an image URL?
You use image URLs in website HTML (inside an img src attribute), Markdown files (inside the image block syntax), CMS platforms, page builders, email editors, automation tools, and any no-code tool that requests an image source link instead of a file upload.
What is the difference between a direct image URL and a preview page link?
A direct image URL points to the image file itself and works as a source for HTML, Markdown, and embeds. A preview page link points to a webpage that displays the image inside a viewer layout. A website or editor expects the file, not the page, so a preview link usually fails when pasted as an image source.
How do you check if an image URL is usable?
Open it in a private browser window, paste it inside a simple HTML image tag, or test it in a Markdown image block. If the link opens only the image file with no surrounding page layout, it is likely a direct image URL. If it opens a preview screen with buttons and navigation, it is a page link, not a file URL.

