Sub topic 14
Keeping the page and downloads fast
This chapter assumes you can read basic HTML and know how a browser loads a page and its images. It also assumes you have a newsroom page with press releases and a media asset area, as built in earlier chapters. The goal here is to keep that page quick to open and to keep large downloads from slowing it down.
Why speed matters for a newsroom
Journalists often work on deadline, on mobile networks, or from event venues with poor Wi-Fi. A newsroom page that takes ten seconds to show a headline loses them. Search engines and social platforms also fetch your page. A slow response can lead to a shortened link preview or a skipped crawl.
A press kit has a speed problem that most pages do not have. It exists to offer large files: high-resolution photos, logo packs, PDF fact sheets, and sometimes video. The page itself should be light. The files should be heavy only when someone asks for them.
That gives you one rule for the whole chapter: separate what the page shows from what the visitor downloads.
What to measure
Three browser-reported measures cover most newsroom problems. They are the Core Web Vitals.
| Metric | What it measures | Common newsroom cause when it is bad |
|---|---|---|
| Largest Contentful Paint (LCP) | Time until the biggest visible element appears | An oversized hero photo or a late-loading web font |
| Cumulative Layout Shift (CLS) | How much content jumps while loading | Images with no width and height, late banners |
| Interaction to Next Paint (INP) | Delay between a click and the visual response | Heavy scripts for galleries or filters |
Measure before you change anything. Lighthouse in Chrome DevTools gives a lab result in about a minute. PageSpeed Insights adds field data from real visitors when your site has enough traffic. Lab and field numbers differ, so use the lab run to find causes and the field data to confirm the fix helped.
Test on a throttled connection too. In DevTools, the Network panel lets you choose a slow preset. Press kit pages look fine on an office connection and badly on a phone.
Thumbnails in the page, originals behind a link
The most common mistake is putting the full-resolution photo in the page. A 6000 by 4000 pixel press photo can weigh 8 MB. If the gallery shows twelve of them, the page is 96 MB before anyone has chosen anything.
Create two versions of every image:
- A preview sized for the screen, usually 400 to 800 pixels wide, a few tens of kilobytes.
- An original for download, linked from the preview, never embedded.
<figure>
<a href="/newsroom/assets/widget-2-original.jpg" download>
<img
src="/newsroom/assets/widget-2-640.jpg"
srcset="/newsroom/assets/widget-2-320.jpg 320w,
/newsroom/assets/widget-2-640.jpg 640w,
/newsroom/assets/widget-2-1280.jpg 1280w"
sizes="(min-width: 800px) 33vw, 100vw"
width="640" height="427"
loading="lazy"
decoding="async"
alt="Widget 2 on a desk next to a laptop">
</a>
<figcaption>
Widget 2, landscape. Original: JPEG, 6000 × 4000 px, 7.8 MB.
</figcaption>
</figure>Each attribute has a job:
srcsetandsizeslet the browser pick the smallest file that still looks sharp on its screen.widthandheightreserve space before the image arrives, which prevents layout shift. CSS can still scale the image. The browser uses the two values to compute the aspect ratio.loading="lazy"delays fetching until the image is near the viewport.downloadon the link suggests saving rather than opening. It works only for same-origin URLs, so a file on a different domain or a CDN hostname may open in the tab instead.
The caption states the original's format, dimensions, and size. Journalists use that to decide whether to click, and it sets expectations for slow connections.
Do not lazy-load the first image
Lazy loading is wrong for the image that fills the top of the screen. The browser must first discover that it is near the viewport, which delays LCP. For a hero image, load it eagerly and raise its priority:
<img
src="/newsroom/img/hero-1280.jpg"
width="1280" height="640"
fetchpriority="high"
alt="Acme team at the Widget 2 launch event">Use fetchpriority="high" on one image only. If several images claim high priority, none of them stands out.
Choosing formats
| Use | Format | Notes |
|---|---|---|
| Photo previews | WebP or AVIF, with JPEG fallback | Often 25 to 50 percent smaller than JPEG at similar quality |
| Photo originals | JPEG | Journalists and print tools open it everywhere |
| Logos on the page | SVG | Small and sharp at any size |
| Logo downloads | SVG, plus PNG with transparent background | Also offer EPS or PDF if print outlets need it |
| Screenshots with flat color | PNG or WebP | JPEG makes text blurry |
Serve modern formats for the preview and keep a JPEG original. Use picture so older browsers still work:
<picture>
<source type="image/avif" srcset="/newsroom/assets/widget-2-640.avif">
<source type="image/webp" srcset="/newsroom/assets/widget-2-640.webp">
<img src="/newsroom/assets/widget-2-640.jpg"
width="640" height="427" loading="lazy"
alt="Widget 2 on a desk next to a laptop">
</picture>Do not convert the downloadable original to a format a newsroom desk may not open. A journalist who gets an AVIF file their layout software rejects will email you, which is the thing the press kit exists to prevent.
Packaging downloads
Offer a single ZIP for each group of related assets, such as "Logo pack" or "Product photos, Widget 2". Journalists then make one request instead of twenty. Alongside each ZIP, show:
- The file size, for example "14.2 MB".
- The format and what is inside.
- The date it was last updated.
Do not put the ZIP into the page flow. Link to it:
<ul>
<li>
<a href="/newsroom/downloads/acme-logo-pack.zip" download>Logo pack (ZIP, 2.1 MB)</a>
<span>SVG, PNG, and EPS. Updated 2026-03-12.</span>
</li>
<li>
<a href="/newsroom/downloads/widget-2-photos.zip" download>Widget 2 photos (ZIP, 38 MB)</a>
<span>Six JPEGs, 6000 px wide. Updated 2026-03-12.</span>
</li>
</ul>Compress images before zipping, using a tool such as cwebp, avifenc, mozjpeg, or ImageMagick. JPEG files are already compressed, so ZIP will not shrink them. The saving comes from export quality settings, not from the archive.
Very large video should not be a direct download. Host it on a video service and link to it, then offer a short, compressed version for direct use.
Caching and compression
The server and the CDN, a network of servers that keep copies of your files close to visitors, decide how often a file is fetched again. Two settings matter most.
Compression. Enable Brotli or gzip for HTML, CSS, JavaScript, SVG, RSS, and XML. Text shrinks by 70 percent or more. Do not compress JPEG, PNG, WebP, AVIF, or ZIP. They are already compressed, and the extra work buys almost nothing.
Cache headers. Tell browsers how long they can reuse a file. A common pattern uses different rules for the page and for the assets:
location /newsroom/assets/ {
add_header Cache-Control "public, max-age=31536000, immutable";
}
location /newsroom/ {
add_header Cache-Control "public, max-age=300, must-revalidate";
}The long lifetime on assets is safe only if the file name changes whenever the content changes. Name files widget-2-640.v2.jpg or include a content hash. If you overwrite logo.png and keep the name, visitors and CDNs will keep serving the old logo for up to a year. Where a file must keep a fixed name, for example a "latest logo" URL, give it a short lifetime or use no-cache, which makes the browser check with the server before reusing it.
Keep the HTML cache short. A new press release should appear within minutes, and the RSS feed and sitemap should follow the same rule.
Keeping scripts and fonts small
A newsroom page is mostly text and links, so it rarely needs much JavaScript. Check what you ship:
- Avoid a heavy gallery library when plain links to originals work.
- Load analytics with
asyncordeferso it does not block rendering. - Use at most two font files. Add
font-display: swapso text appears in a fallback font immediately. - Embed a video as a link with a thumbnail, not as an iframe, until the visitor clicks. A video iframe can add hundreds of kilobytes of script.
Client-side filtering of releases is another place for trouble. If you have hundreds of releases, paginate the archive at the server, with stable URLs such as /newsroom/releases/?page=2, so each page stays small and crawlable.
A speed check you can repeat
- Run Lighthouse in mobile mode on the newsroom index and on one release page.
- Open the Network panel, sort by size, and look at the five largest requests.
- Confirm that no original photo loads on page open.
- Confirm that every
imghaswidthandheight. - Check response headers for
content-encodingon text files and acache-controlon assets. - Download each ZIP and check that its size matches the label on the page.
Run it after each publishing round, not once at launch. A new release with an unresized photo undoes the earlier work.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Page weighs tens of megabytes | Originals embedded as `img` sources | Create previews and link to originals |
| Page jumps while loading | Missing `width` and `height` | Add both to every image |
| Slow top-of-page image | `loading="lazy"` on the hero | Remove it and add `fetchpriority="high"` |
| Updated logo still shows the old one | Long cache with unchanged file name | Version the file name |
| `download` opens the file in the tab | File is on another origin | Serve it from the same origin or set `Content-Disposition: attachment` |
| ZIP is as large as its contents | Contents already compressed | Re-export images at lower quality |
Exercise
A newsroom gallery shows eight product photos. Each is a 5 MB JPEG, shown at 300 px wide with width="300" set in HTML. Lighthouse reports a total page weight near 40 MB. Describe three changes that cut this, and say which one you would do first.
Show answer
First, create small previews (for example 320 and 640 px wide, in WebP with a JPEG fallback) and use them as the img sources, because the width attribute does not reduce the download. Second, link each preview to the original 5 MB JPEG so full-size files load only on request, and show the file size in the caption. Third, add loading="lazy" to images below the first screen, plus width and height on all of them to prevent layout shift. Do the first change first. It removes most of the 40 MB, and the other two build on it.
Exercise
You overwrite /newsroom/assets/logo.png with a new logo. The server sends Cache-Control: public, max-age=31536000, immutable. Journalists still see the old logo. Why, and how do you fix it without shortening the cache?
Show answer
Browsers and CDNs may reuse the cached file for up to a year without checking the server, and immutable tells them it never changes. Because the URL stayed the same, they have no reason to fetch the new file. Fix it by giving the new file a different URL, such as logo.v2.png or a name with a content hash, and updating the page and download links to point to it. The old URL can stay cached because nothing links to it any more.