Why HTML Images Don't Show in Chrome and How to Fix
In this article
Images not displaying in Chrome is almost always caused by one of three things: a broken file path in the src attribute, a blocked or expired image URL, or a browser-level issue like cached data or an extension interfering. Below are the exact steps to diagnose and fix each cause, followed by deeper context on how image loading works in Chrome.
How Chrome Loads Images
When you open a webpage, Chrome parses the HTML and encounters an <img> tag. It then sends a separate HTTP request for the file specified in the src attribute. The browser does not embed the image into the HTML; it fetches it as a separate resource. This means the image can fail for reasons unrelated to your HTML code, such as network issues, server permissions, or file corruption.
Chrome also uses a memory cache and a disk cache to speed up repeat visits. If a cached version of an image is corrupted or incomplete, Chrome may refuse to display it even when the file on the server is fine. This is why a hard refresh or clearing cache often resolves the issue.
Common Causes and Quick Fixes
Here are the most frequent reasons images fail to appear, with a corresponding fix for each:
- Incorrect file path – Check the
srcattribute. Relative paths likeimages/pic.jpgare resolved relative to the current page’s URL. If the page is atexample.com/folder/page.html, the path points toexample.com/folder/images/pic.jpg. Use an absolute path like/images/pic.jpgor a full URL to avoid ambiguity. - File name or extension typo – Chrome is case-sensitive on most web servers.
Pic.JPGis not the same aspic.jpgon Linux-based hosting. Also, ensure the extension matches the actual file type (e.g.,.jpegvs.jpg). - Blocked by ad blocker or extension – Some ad blockers block images from domains known to serve ads. Try disabling extensions one by one or open the page in Incognito mode (which disables extensions by default) to test.
- Corrupted browser cache – Press Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac) to force a hard reload that bypasses the cache. If that doesn’t work, clear the cache completely via Chrome settings.
- Server or hosting issue – The image file might be missing, renamed, or the server might be returning a 404 error. Open the image URL directly in a new tab to see if it loads.
- Hotlink protection – Some websites block images from being displayed on other domains. If you are embedding an image from another site, check if they allow hotlinking.
How to Diagnose the Exact Problem
Chrome’s Developer Tools give you the most direct answer. Right-click the broken image icon and select Inspect, then look at the Console and Network tabs. The Network tab shows every request the page makes; find the image request and check its status code:
- Open DevTools with F12 or Ctrl+Shift+I.
- Click the Network tab and reload the page.
- Look for the image file name in the list. If it shows 404, the file is not at that location. If it shows 403, the server is denying access. If it shows 200, the image loaded successfully, but the display issue might be CSS-related.
- Check the Console for errors like “Failed to load resource” or “net::ERR_BLOCKED_BY_CLIENT” (which indicates an extension blocked it).
CSS and Layout Issues That Mimic Broken Images
Sometimes the image loads fine, but you still don’t see it. This can happen if CSS hides it or if the image has zero dimensions. Common culprits:
display: noneon the image or a parent element.width: 0orheight: 0set explicitly.- An
altattribute that is very long, causing the broken image icon to appear but the image itself is actually there. - An overlapping element with a higher z-index covering the image.
To test, right-click the image area and select Inspect. In the Elements panel, check the computed styles for the image. If the src is correct and the network request succeeded, the problem is almost certainly CSS.
HTTPS and Mixed Content Issues
If your page is served over HTTPS (secure), Chrome will block images loaded over plain HTTP (insecure). This is called mixed content. You’ll see a warning in the address bar (a shield icon) and a console error like “Mixed Content: The page at 'https://...' was loaded over HTTPS, but requested an insecure image.”
To fix this, change the image URL to use HTTPS as well. If the image is on a server that doesn’t support HTTPS, you’ll need to host it on a secure server or use a protocol-relative URL like //example.com/image.jpg (which inherits the page’s protocol).
When It’s a Chrome-Specific Problem
Occasionally, Chrome itself has a glitch. If images work in Firefox or Edge but not Chrome, try these steps:
- Restart Chrome completely (close all windows and reopen).
- Disable hardware acceleration: Go to Settings → System → turn off “Use hardware acceleration when available”. This fixes some rendering bugs.
- Reset Chrome flags: Type
chrome://flagsin the address bar, click “Reset all to default”, and restart. - Update Chrome to the latest version.
If none of that works, create a new Chrome user profile to rule out a corrupted profile.
Preventing Future Image Loading Failures
To minimize the chance of broken images, follow these best practices:
- Use relative paths only when the image is in the same directory or a subdirectory of the current page. For site-wide images, use root-relative paths (starting with
/). - Always include an
altattribute with descriptive text – it helps with accessibility and shows a text fallback if the image fails. - Compress images before uploading to reduce load time and avoid server timeouts.
- Host images on a reliable CDN or server with good uptime.
- Use
loading="lazy"for images below the fold, but be aware that lazy loading can cause images not to appear if JavaScript fails.
Frequently Asked Questions
Why do images show in Firefox but not Chrome?
This usually points to a Chrome-specific issue like an extension blocking the image, a corrupted cache, or a Chrome flag that changed image rendering. Try disabling extensions, clearing cache, or resetting Chrome flags. It can also be a mixed content issue if Chrome is stricter than Firefox in that version.
How do I fix a broken image icon in Chrome?
Right-click the broken icon and select “Inspect” to see the network request. If it’s a 404, fix the file path. If it’s a 403, check server permissions. If the request succeeds, look at CSS styles that might hide the image. Also try a hard refresh.
Can an ad blocker cause images not to load?
Yes. Ad blockers often block requests to domains that serve ads, and some image hosts are on those lists. Temporarily disable your ad blocker or open the page in Incognito mode (extensions are off by default) to test.
What does “Failed to load resource” mean in Chrome console?
It means the browser attempted to fetch the image but the server did not return a valid response. The Network tab will show the specific HTTP status code – 404 (not found), 403 (forbidden), 500 (server error), or net::ERR_INTERNET_DISCONNECTED if you lost network.
Is there a size limit for images in Chrome?
No, Chrome can display very large images, but extremely large files (e.g., 50MB) may take a long time to load or cause memory issues. The browser will still attempt to load them. If the image is too large, the server might time out before sending the whole file.
Why does an image work on localhost but not on a live server?
Localhost often uses case-insensitive file systems (like Windows), while live servers (Linux) are case-sensitive. Also, the live server might have different directory permissions or a different root path. Check that the file was uploaded to the correct directory and that the path casing matches exactly.