How to serve jpgs in development mode

I’m attempting to use MM as my blog (using middleman-blog).

What I want:

  1. A directory named “source/photos”. I’ll export my photos from Lightroom to this directory.
  2. No coupling between a photo and a blog post in the directory structure.
  3. Link to a photo in a post.

For the life of me, I can’t seem to get MM in development mode to serve up a jpg. I’ve gone so far as dumping a jpg into images/photos/blah.jpg but receive a 404 from http://localhost:4567/images/photos/blah.jpg. (I prefer not to have these under “images”, this was only for testing.)

I’m missing something very basic here. Any help?

You can set up images folder in the config.rb file:

set :images_dir, 'photos'

How do you make links to your photos in the posts? Try something like:

<%= image_tag 'myphoto.jpg', :alt => 'My photo title' %>

Thanks for the reply. images_dir is already set to “images”. I’d prefer to keep images separate from photos. Images are the blog styling. Photos are post content that won’t change regardless of the blog styling.

Regardless I figured out the problem. My photo names are prefixed with an underscore. That’s just how they come off the camera. I removed the underscore and they’re now being served up from source/photos. I remember seeing something in the MM source that filtered on underscore prefixes.

Guess I just needed to sleep on it. Thanks again for the reply.