fix png/jpeg b64-encoding check