Preconnect to Your Partner Photo CDN #
Every animal photo on a PMP search or detail page is hosted on your shelter system’s own image CDN, not on your WordPress site. PetPoint serves photos from g.petango.com, AnimalsFirst from animalsfirstprod.s3.amazonaws.com, and RescueGroups from cdn.rescuegroups.org. Each of those is a separate hostname that costs the browser a DNS lookup, a TCP handshake, and a TLS handshake before the first byte of the first photo arrives – typically 100-300 ms on top of the photo download itself.
The Preconnect to Partner Photo CDN setting (General > Performance) tells PMP to inject a <link rel="preconnect"> tag into the page <head>. The browser uses that hint to start the handshake in parallel with HTML parsing, so by the time it encounters the first <img>, the connection is already warm.
When It Fires #
The hint only appears on pages that actually render PMP content. PMP detects this by either:
- Finding a
[pmp-search],[pmp-details], or[pmp-detail]shortcode in the post body, or - Recognizing the SEO pretty-permalink URL pattern
/pmp/{method}/{slug}/
Unrelated pages (your homepage, about page, blog posts) do not get the preconnect tag – you only pay the DNS/TLS warm-up cost where it pays off.
How Much It Saves #
The win depends on visitor latency and how many photos are on the page. Rough numbers from a typical search results grid (12 animals, 1 image each):
| Network | Without preconnect | With preconnect | Saved |
|---|---|---|---|
| Desktop, 50ms RTT | ~180ms | ~10ms | ~170ms |
| Mobile 4G, 100ms RTT | ~350ms | ~15ms | ~335ms |
| Mobile 3G, 300ms RTT | ~900ms | ~30ms | ~870ms |
This is purely the connection-setup savings. Image download time is unchanged.
Default Behavior #
The setting is enabled by default for both fresh installs (8.11.0 and later) and existing sites upgrading from earlier versions. There is no operator action required – the perf win lands silently the first time the new code runs.
When You Might Disable It #
- You are using a custom CDN proxy that fronts the partner CDN behind your own hostname. In that case the partner host is never contacted directly and the preconnect would warm up the wrong connection. Disable PMP’s preconnect and add your own at the proxy hostname via your theme or a perf plugin.
- You have a content security policy (CSP) that does not allow the partner CDN host as a
connect-srcorimg-src. Fix the CSP first; the preconnect itself is harmless but the eventual image load will be blocked. - You are debugging a connection issue and want to see DevTools network waterfall with no preconnect optimization in the way.
Verifying It Is Working #
On any page that has a PMP shortcode, view the HTML source (Ctrl+U) and search for preconnect. You should see a line like:
<link rel='preconnect' href='https://g.petango.com' />
Or in Chrome DevTools, open the Network tab and look at the very first request: connection setup phases (DNS, Initial connection, SSL) should be near zero for the partner-CDN images, because the handshake already happened.
Related Settings #
- API Caching – server-side cache of partner responses; complements preconnect by also saving on the API round-trip.
- Stale Content / Cache Issues – troubleshooting if the wrong CDN host appears in the preconnect tag (usually means a partner change without re-saving General settings).