Description
The images-resize
task puts all resized images in the out-dir
("public" by default), which was surprising to me.
I use subdirectories to organize content, keeping images and pages together. E.g.
resources
├── 2019-05-01-figuring-out-whats-overhead
│ └── 2019-05-01-figuring-out-whats-overhead.md
└── public
└── 2019-05-01-figuring-out-whats-overhead
├── 3ff1.png
└── vrs-options.png
If I don't use the images-resize
task, this generates the following structure in target
:
target
└── public
└── 2019-05-01-figuring-out-whats-overhead
├── figuring-out-whats-overhead.html
├── 3ff1.png
└── vrs-options.png
The images are copied to the corresponding location in target
.
If I add this task:
(perun/images-resize :resolutions #{800})
I end up with this structure:
target
└── public
├── 3ff1_800.png
├── vrs-options_800.png
└── 2019-05-01-figuring-out-whats-overhead
├── figuring-out-whats-overhead.html
├── 3ff1.png
└── vrs-options.png
It seems like images-resize
changes the default behavior that files will be copied to a location in target
that corresponds to their location in resources
. This feels surprising and less useful than putting the resized images in the corresponding output locations for the original images.
I understand a potential workaround would be to specify :out-dir
for the task, but I don't know how to do that without adding a separate images-resize
task for each subdirectory, which feels somewhat onerous given the default behavior without images-resize
doesn't require any per-subdirectory tasks.