Current dependence on Plug for route param parsing and Erlang's inability to pattern match binaries like param <> ".ext" makes this difficult to handle at compile time without rewriting a good amount of code.
Optimal solution at this point will probably be a plug to be early in the call stack, parsing the last captured param for an extension/MIME-type, setting Accept header, and removing the extension