A site accumulates files nobody named, nobody deleted, and nobody can identify. A naming convention and a folder structure decided once make the difference between a site somebody can maintain and one they have to guess at.

Why it matters despite being invisible

Visitors never see your file structure, which is why it is neglected. Four costs appear later.

Finding things. Needing the original of a photograph from a job two years ago and having no way to identify it among four hundred files.

Handover. A new developer or a new staff member facing a media library of untitled uploads has to guess what is in use.

Weight. Files nobody deleted accumulate, and backups get slower and larger for no benefit.

Search. Filenames are one of the signals used to understand what an image shows, so a file called by a camera reference tells search engines nothing.

Naming files

The single highest-return habit, applied at the moment of upload.

Descriptive words, lowercase, separated by hyphens, no spaces, no capitals, no special characters. A file describing what it shows rather than what the camera called it.

Spaces in filenames cause encoding problems in addresses. Capitals cause case-sensitivity problems when moving between systems. Both are avoidable at no cost by deciding once.

Where a file relates to a specific job or page, including that in the name makes it findable later. A photograph named for the neighbourhood and the work is one you can retrieve in three years; one named by a phone's default is not.

Version numbers in filenames

Worth addressing because everybody does it and it goes wrong the same way.

A file ending in final, then final-2, then final-actual, is a version control problem being solved with filenames, and the ending is always somebody using the wrong one.

The workable alternative is a date in the name, which sorts correctly and never becomes ambiguous. A file named with the year, month, and day is unambiguous about which is most recent.

For anything genuinely iterated, the versions belong somewhere designed for it rather than in the site's own uploads.

Folder structure

Where the platform allows it, a shallow structure beats a deep one.

Grouping by year and month, which many systems do automatically, works well enough for photographs. Grouping by type, such as separating documents, photographs, and logos, works better for the things you retrieve deliberately.

What to avoid is folders reflecting a project structure nobody will remember, or a hierarchy so deep that finding anything requires knowing where it was put.

Three levels is generally the practical limit before the structure becomes a puzzle.

Originals versus what is published

A distinction worth maintaining and frequently collapsed.

The site should carry web-sized, compressed images. The originals at full resolution should exist somewhere else, backed up, because you will eventually need to produce a printed version or recrop something.

Uploading originals to the site is the most common cause of a slow site, and deleting originals after compressing them is the most common cause of not being able to use a photograph again.

Keeping them separately solves both, and the separate store does not need to be sophisticated. A dated folder structure on a backed-up drive is sufficient.

The clean-up

Worth doing once, carefully, because deleting a file in use breaks a page.

  1. Find what is unattached, which many content systems can report.
  2. Check before deleting, since an image may be used in a way the system does not track.
  3. Take a full backup first.
  4. Remove obvious duplicates, which accumulate through repeated uploads of the same photograph.
  5. Delete in batches, checking the site after each.

The duplicate problem is worth checking specifically. The same image uploaded four times under four names is four files, four sets of generated sizes, and a media library nobody can navigate.

Documents

A separate category with a specific hazard.

Files uploaded to a site are frequently publicly reachable whether or not they are linked. A document uploaded for one person, or an old price list nobody removed, remains accessible to anybody with the address and can be found in search.

Which means anything not intended for the public should not be uploaded to the site at all, and old documents should be removed rather than merely unlinked.

It is worth searching your own site occasionally for document files to see what is actually sitting there.

Writing the convention down

Half a page, given to anybody who uploads anything.

How files are named, where originals live, what gets compressed before upload, and what the maximum dimensions are. Without it, every person who touches the site introduces their own habits.

That document is also what makes the site maintainable by somebody other than the person who built it, which is the same argument as any handover record, and it depends on knowing who can upload in the first place, as covered in static pages versus a database.


Frequently asked questions

Why does file organisation matter if visitors never see it?

Finding originals later, handing the site to somebody new, backup weight, and search, since filenames are one signal used to understand what an image shows.

How should files be named?

Descriptive words, lowercase, hyphen-separated, no spaces or capitals. Spaces cause encoding problems in addresses and capitals cause case-sensitivity problems between systems.

What about version numbers?

A date in the name sorts correctly and never becomes ambiguous. Final, final-2, and final-actual is version control done with filenames, and somebody always uses the wrong one.

Should originals be kept on the site?

No. The site should carry compressed web-sized images, with full-resolution originals backed up elsewhere so you can reuse or reprint them later.

How do I clean up safely?

Back up first, find unattached files, check before deleting since some uses are not tracked, remove duplicates, and delete in batches while checking the site.

What is the hazard with documents?

Files uploaded to a site are frequently publicly reachable whether linked or not. Anything not meant for the public should not be uploaded, and old documents removed rather than unlinked.

West Coast Media Solutions Inc. provides web design, web development, hosting, digital marketing, and business consulting to organisations across Canada, drawing on more than twenty-five years in the field.

Media library full of files called image47?

We set the naming convention, separate the originals from what is published, and clean up safely without breaking pages.

Start a Conversation