Skip to Content
HTML & CSS: The Good Parts
book

HTML & CSS: The Good Parts

by Ben Henick
February 2010
Intermediate to advanced
352 pages
11h 4m
English
O'Reilly Media, Inc.
Content preview from HTML & CSS: The Good Parts

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, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

HTML & CSS: Design and Build Websites

HTML & CSS: Design and Build Websites

Jon Duckett
Head First HTML and CSS, 2nd Edition

Head First HTML and CSS, 2nd Edition

Elisabeth Robson, Eric Freeman

Publisher Resources

ISBN: 9781449381943Errata Page