mojombo/jekyll — Issue #489: What is the recommended way for keeping a post's figures together?
Author: cubranic
Created: 2012-01-27 17:00:20+00:00
State: open

My posts often include images for illustration, for example, screenshots. I currently keep those in a directory `images` that's copied over to `_site` during the generation.

This works, but the filename and link management is a real pain. If I try to keep all files related to a post together in a single subdirectory of `images`, referencing them from a post becomes a nightmare of relative paths (e.g., `../../../2012/01/20/img1.png`).

Alternatively, I can keep the image directory flat. This makes linking from the article easy, but I pay for it when I try to find anything in the image directory. It now has dozens of images, which, to make it worse, now also have long names to make it clear which article they belong to.

Is there really no way around this problem and I need to choose either simple links to my figures _or_ nicely organized image directories?