Redundant directory when using Hugo Pipes

This may be required by design but I was surprised by the behavior so thought I’d ask.

If I use Hugo Pipes to, for instance, minify and fingerprint a SVG that’s found at assets/svg/test.svg:

$image := resources.Get "svg/test.svg"` | minify | fingerprint

The resulting $image.Permalink will point to the generated resource in the resources/_gen/assets/svg/svg directory … why the duplicated directory? Is one of the two based on the asset’s file extension, and the other the relative path provided in the resources.Get call? In that case is the best practice to keep all assets in the root of the assets directory?

The first part is the SubType in the MIME type. The thing is, we store some of these resources in memory, and we use this as one part of the cache invalidation scheme.

Ahh, ok. Thanks.