There are other approaches that could be easier to code and to maintain
IE. Upwork has years with screenshot feature and it has not changed, it works maybe we could follow that