balupton/docpad — Issue #82: Images corruption
Author: MarcosBL
Created: 2011-10-17 12:43:42+00:00
State: open

If you drop a bunch of images into a folder and try to autogenerate a page listing with them, the doc generation corrupts all images in "out" folder:

First i dropped a lot of jpg/gif/png files in src/img/wallpapers, then created an eco template:

<% for Document in @Documents: %>
<% if Document.url.indexOf('/img/wallpapers') == 0: %>

<% end %>
<% end %>

The data populates well into their fields, and images src, etc, are correct, the images are even copied into the OUT folder correctly, BUT the images gets (all of them) corrupted.

I know i can stored them outside, in the "files" folder, and maybe that way they will not be corrupted, but that kills the idea of listing them automatically, because i can't access the "files" folder from the @Documents var.

I read in the wiki you can add an "ignore" tag to files you don't want to process, but it have it's pitfalls (i'll publihs another Issue on that) and is not usable in a binary image.

Any idea on why this corruption happens/how to avoid it ?