Open
Description
What if you could register data loaders for request patterns? Like could you register optipng
as the data loader for all *.png
requests and it would auto-optimize every PNG (getting cached)? Or you could write a script to convert PNG to WebP? That would be cool. It’s a bit like parameterized data loaders #245, but you wouldn’t enumerate the parameter values — they would be inferred from files that are already statically referenced, and maybe they would take the input file contents to stdin (or take the file name as the argument?).