Publishing Images

Publishing images might seem like a straightforward task, but that’s not always the case. Destination folders, filenaming conventions, and Content Management System (CMS) behavior are relevant to image publication, to degrees that vary on a per-project basis.

Keeping Images Organized

If a site has reasonably high production values, it will likely incorporate dozens or hundreds of images. Larger sites, especially those operated by social networking services, often store hundreds of thousands or even millions of individual image files.

So if you’re the one who needs to keep them all organized, what do you do?

In some ways, the organization of a site’s image assets is a mirror of the organization of the site itself; the only major cognitive challenge of image management arises when you have so many images to organize that you need to spread them across multiple directories. For small sites, my approach is to upload files to an /images directory and name them with series of tokens, for example:

/images/bg_sidebar_contact.jpg

When generalized, that comes across as:

type_pagescope_sitescope.ext

There are other tokens you can add: subject descriptors, artist surnames, and production dates all offer legible clues about an image’s content, at least to a maintainer who is familiar with the site.

Filename tokens can follow whatever order you feel is most appropriate. I choose to put a type token first, because in my experience it makes file listings easier to scan.

On larger sites, ...

Get HTML & CSS: The Good Parts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.