Image Source Test
Test each image source below. Configure credentials, click Load, and verify images appear. Once confirmed, the working source feeds into the gallery page automatically.
☁️ Cloudinary Configuration
Not loaded
No API key needed — Cloudinary Search API is CORS-safe from the browser for public folders.
OneDrive sync: Cloudinary Dashboard → Settings → Import → Connect OneDrive → source: The Cake Avenue/Gallery → auto-sync ✓
OneDrive sync: Cloudinary Dashboard → Settings → Import → Connect OneDrive → source: The Cake Avenue/Gallery → auto-sync ✓
📁 OneDrive — via WordPress Proxy
Not loaded
OneDrive requires a server-side proxy (OAuth token cannot be in browser JS).
See the HTML comments at the top for the full WP functions.php snippet.
Tip: Use Cloudinary’s OneDrive sync instead — you get CDN + AI tags for free.
See the HTML comments at the top for the full WP functions.php snippet.
Tip: Use Cloudinary’s OneDrive sync instead — you get CDN + AI tags for free.
🗂 Google Drive — Subfolder Browser
From the URL: drive.google.com/drive/folders/FOLDER_ID — this is your gallery parent folder.
Enter folder ID and API Key, then click Scan
Both the root folder and each subfolder must be shared as “Anyone with the link → Viewer”.
API Key: console.cloud.google.com → APIs & Services → Credentials → restrict to Google Drive API.
API Key: console.cloud.google.com → APIs & Services → Credentials → restrict to Google Drive API.
📸 Instagram Business — via WordPress Proxy
Not loaded
Requires Instagram Business account linked to a Facebook Page.
Access token valid 60 days — add a WP cron job to refresh it.
WP proxy endpoint format: returns array of {id, media_url, caption, timestamp}
Access token valid 60 days — add a WP cron job to refresh it.
WP proxy endpoint format: returns array of {id, media_url, caption, timestamp}
▶ Show WordPress proxy snippet (functions.php)
add_action('rest_api_init', function(){
register_rest_route('cakeavenue/v1', '/instagram-feed',
['methods'=>'GET','callback'=>'ca_get_instagram',
'permission_callback'=>'__return_true']);
});
function ca_get_instagram(){
$cached = get_transient('ca_instagram_feed');
if($cached) return rest_ensure_response($cached);
$token = get_option('ca_instagram_token');
$ig_id = get_option('ca_instagram_user_id');
$url = 'https://graph.facebook.com/v18.0/'.$ig_id.'/media'
. '?fields=id,media_type,media_url,thumbnail_url,caption,timestamp'
. '&limit=20&access_token='.$token;
$res = wp_remote_get($url);
$body = json_decode(wp_remote_retrieve_body($res), true);
$images = array_filter($body['data']??[], function($p){
return $p['media_type']==='IMAGE' || $p['media_type']==='CAROUSEL_ALBUM';
});
$result = array_values($images);
set_transient('ca_instagram_feed', $result, 6*HOUR_IN_SECS);
return rest_ensure_response($result);
}