Add compressToBase64 support