self-contained mock image encoding
remove unused mock