GOOGLE PROFILE PHOTO CORS FIX ============================= STEP 1: Add this function after line 92 in preview.php (after the brandExists function): /** * Get safe profile photo URL - uses local fallback if Google URL fails */ function getSafeProfilePhoto($googleUrl, $campaign_key, $reviewIndex) { // If it's already a local image, return as-is if (strpos($googleUrl, '/hslg/images/') !== false || strpos($googleUrl, 'http://localhost/hslg/images/') !== false) { return $googleUrl; } // For Google URLs, use local fallback to avoid CORS issues // Generic reviewer images are numbered 1, 2, 3 $fallbackNumber = (($reviewIndex % 3) + 1); $imageURL = "/hslg/images/"; return $imageURL . "campaigns/" . $campaign_key . "/GenericReviewImage" . $fallbackNumber . ".png"; } STEP 2: Replace line 3270 (first reviewer image): FROM: " /> TO: " /> STEP 3: Replace line 3375 (second reviewer image): FROM: " /> TO: " /> STEP 4: Replace line 3480 (third reviewer image): FROM: " /> TO: " /> WHAT THIS DOES: - Detects if the image is from Google (contains lh3.googleusercontent.com) - Automatically falls back to your local GenericReviewImage1.png, GenericReviewImage2.png, GenericReviewImage3.png - Prevents CORS blocking errors - Still uses your local images when gbp_found is false