works on my machine, needs edge test on real wordpress website, also base64 code length rules need to be revisited