I've integrated a solution that I think is acceptable for my use case and how your module works.
In practice I made sure that among the paths to be analyzed the syntax
rolltable:<TABLE ID>
is accepted to retrieve images from a rolltable (which can be filled in various ways CSV, Compendium, other modules, etc.) and where I can finally use whatever web reference or local file I want.
Another advantage of the solution offered by the rolltable is to associate a specific name to the image without depending on its file name, this makes it possible to associate the "xxx.png" image with the name "Lizardfolk" searchable through your functions.
Related to this request https://github.com/Aedif/TokenVariants/issues/23 (which after seeing the code I realized it was too complex solution for how the code is set up).
I've integrated a solution that I think is acceptable for my use case and how your module works.
In practice I made sure that among the paths to be analyzed the syntax
rolltable:<TABLE ID>
is accepted to retrieve images from a rolltable (which can be filled in various ways CSV, Compendium, other modules, etc.) and where I can finally use whatever web reference or local file I want.
Another advantage of the solution offered by the rolltable is to associate a specific name to the image without depending on its file name, this makes it possible to associate the "xxx.png" image with the name "Lizardfolk" searchable through your functions.