converted images to base64 encode for better performance