A local page shows images, but the shared preview has broken icons.
HTML publishing guide
Images not showing in HTML after upload
Images usually disappear after upload because the HTML references files that were not uploaded, paths changed, filenames differ by case, or the project was zipped at the wrong folder level.
Quick answer
Check the img src path, include the image folder in the upload, preserve relative paths, and make sure filenames match exactly, including capitalization.
Real use cases
An AI-generated page references images in an assets folder.
A ZIP upload contains the files but index.html is at the wrong level.
Steps
Inspect the image path
Look at each img src and CSS background url(). Prefer relative paths such as assets/logo.png.
Confirm the file exists in the ZIP
Open the ZIP and verify the image is included at the exact path referenced by the HTML.
Check case and special characters
Logo.PNG and logo.png may behave differently online. Keep filenames simple and consistent.
Examples
Wrong folder level
The HTML says assets/hero.jpg, but the ZIP contains project/assets/hero.jpg while index.html is uploaded alone.
Local absolute path
The HTML uses /Users/name/Desktop/image.png, which cannot work for another browser online.
Practical tips
- Use relative paths.
- Zip the folder that contains index.html and assets together.
- Avoid local drive paths.
- Test the preview before sharing.
Common mistakes
- Uploading HTML without the images folder.
- Changing folder names after export.
- Using uppercase/lowercase filenames inconsistently.
- Referencing images from a local machine path.
Best practices
- Keep assets in a predictable folder.
- Use simple filenames.
- Open browser developer tools if an image still 404s.
- Regenerate the preview after fixing paths.
FAQ
Why do images work locally but not online?
Your local browser can read files from your computer. Online previews can only load files that were uploaded and referenced with valid paths.
Should I upload a ZIP to fix missing images?
Yes, if images are separate files. Include index.html and the image folders in the same ZIP structure.
Can external image URLs break too?
Yes. Remote URLs can block hotlinking, require authentication, or fail over time. Local assets are more predictable when packaged correctly.
Turn the HTML into a link
HTMLShare can preserve static assets when you upload a complete ZIP, which is usually the right fix for images missing after upload.