I don't know what would be the BEST way, but hacking into the source to be 0/1/html would provide the most flexibility. The best location is in ImageFile.pm.