compile '/images/*/' do
# Leave everything in the images directory as is.
and then a bit later on in the routing section ...
route '/images/*/' do
# Make sure that /images/some_image/ is routed to
# /images/some_image.jpg or /images/some_image.png or so
item.identifier.chop + '.' + item[:extension]
I didn't do an actual project and put it up on GitHub for this one, but if this isn't clear, then let me know and I can do that too.