fix base64_encode_images; update comments