# Host images as part of a static site

> Publish image assets inside a StaticX site so they are versioned with the HTML, CSS, JavaScript, and other files that reference them.

Canonical: https://staticx.site/image-hosting

## Static assets together

Images are deployed with the rest of your site files, so references stay stable across each version.

## Not an anonymous image dump

StaticX is project-based hosting. Images belong to a site and follow the storage limits and access rules of the account plan.

## Rollback-safe media

If a release breaks because of an image change, roll back to a previous deployment and restore the exact asset set.

## Host images inside the same release as the page

Images should live beside the HTML and CSS that reference them so every deployment remains reproducible.

1. **Upload image assets** — Place images in your site tree, usually under assets, img, media, or another predictable folder.
2. **Reference stable paths** — Use relative URLs from HTML and CSS so the image works on the free subdomain and custom domains.
3. **Publish the asset set** — Create a deployment version so the page and its images can be rolled back together.

## Image hosting is safest when it belongs to a site.

Anonymous image hosting can separate media from the page that depends on it. StaticX keeps images in the site file tree, under the same storage quota and deployment history.

When a designer updates a hero image or an agent rewrites CSS references, publishing a new version captures the exact asset set that went live.

## Practical image hosting rules

- **Use web-friendly formats** — Prefer compressed PNG, JPEG, SVG, or WebP assets sized for their display location.
- **Avoid private files** — Static sites are public by design. Do not upload images that should remain confidential.
- **Keep folders readable** — Clear media folders make it easier for humans and agents to update references later.

## FAQ

### Is StaticX an anonymous image host?

No. Images are hosted as part of a StaticX site and follow the site storage, deployment, and deletion rules.

### Do image updates create versions?

Editing or uploading changes the working files. Publishing creates the version that stores those image changes in release history.

### Can images be used from CSS?

Yes. Use relative paths and verify the files exist in the deployed tree.

[View on staticx.site](https://staticx.site/image-hosting)
