Images & Videos: How Not to Kill Your Performance?

From TinyPNG to Next.js via Cloudinary: the ideal architecture for a web that is both visual AND fast.

Nov 27, 2025
Read time: 6 min
Tech & UX

In Short

  • The Weight of Visuals: Images account for an average of 50% of a web page's weight. It is the #1 lever for optimizing Core Web Vitals (LCP).
  • Next.js Automation: No more manual resizing. With Next.js, you upload an HD image, and the server automatically generates and serves an optimized version (WebP/AVIF) at the right size.
  • Video Strategy: Never host your MP4 videos directly on your server. Use YouTube for SEO or specialized solutions for experience (Vimeo, Cloudinary).

We live in a paradox. On one hand, marketing and design teams demand ever richer visual experiences (4K videos, high-definition photos). On the other, Google ruthlessly penalizes slow sites via Core Web Vitals, and mobile users drop off after 3 seconds of waiting.

How to reconcile "Beautiful" and "Fast"? It's no longer a question of compromise, but of technical architecture.

1. Why Compress? The Invisible Impact

A raw image straight from a photoshoot can weigh 10 MB. On an average 4G connection, this single image can take 10 to 15 seconds to load.

  • SEO (Google): LCP (Largest Contentful Paint) is a major ranking factor. A heavy image kills your LCP.
  • User Experience (UX): Jerky visual loading gives an impression of amateurism.
  • Cost & Ecology: Transferring useless gigabytes is expensive in bandwidth (hosting) and energy (carbon impact).

2. The "Quick Win": Intelligent Compression Tools

Even before talking about code, there are indispensable tools for "one-shot" processing or static assets (logos, fixed illustrations).

TinyPNG / TinyJPG

It is the benchmark. TinyPNG uses a smart lossy compression technique. By selectively reducing the number of colors, it manages to reduce file sizes by 50% to 80% without visible loss to the naked eye.

VOID Tip: Integrate TinyPNG into your design workflow. Never deliver a mockup or web asset without passing it through the "grinder".

3. The Modern Approach: Next.js Image Component

This is where the magic happens for dynamic sites. With modern frameworks like Next.js, we no longer ask clients to resize their images manually.

// Developer Code

<Image

src="/photo-hd-10mo.jpg"

width=800

height=600

alt="Description"

/>

What Next.js does automatically:

  • Resizing: Generates an 800px version, even if the source is 4000px.
  • Format: Converts the image to WebP or AVIF (next-gen formats, 30% lighter than JPEG).
  • Lazy Loading: Loads the image only when it enters the viewport.
  • Responsive: Serves a small image on mobile and a large one on desktop.

Result: The client uploads a 10 MB photo from the backoffice, but the end user downloads only 45 KB.

4. Heavy Artillery: CDNs (Cloudinary)

For E-commerce sites, marketplaces, or media-rich platforms, hosting images on the same server as the site is no longer sufficient. This is where Image CDNs like Cloudinary come in.

Cloudinary goes further than simple compression:

  • On-the-fly Transformations: You can crop, apply filters, add watermarks, or remove backgrounds via a simple URL.
  • AI and Cropping: Cloudinary's AI can detect the face or main object of a photo to crop it intelligently on mobile (Smart Cropping).
  • Global Distribution: Images are served from servers close to your users (CDN), reducing latency.

5. Video Strategy: YouTube vs Self-Hosted

Hosting a promotional video (MP4) directly on your web server is often a critical mistake. It saturates server bandwidth and slows down the site for all other visitors.

Why YouTube is your SEO ally

Beyond the technical aspect (adaptive streaming that adapts to the user's connection), YouTube is the 2nd largest search engine in the world.

By hosting your videos on YouTube and embedding them on your site:

  • You benefit from Google's streaming infrastructure (zero server load for you).
  • You gain visibility on YouTube.
  • Your videos can appear in Google search results ("Suggested Videos").

Note: For background videos without sound and in a loop, direct hosting or via Vimeo (in clean mode) remains relevant, provided the file is drastically compressed.

Is your site too heavy?

A performance audit often allows gaining precious seconds of loading time simply by optimizing the media strategy.

FAQ: Media Optimization

Which image format should be preferred in 2025?
WebP is the current standard, supported by all modern browsers. AVIF offers even better compression but its support is slightly less universal (though growing). Next.js handles this negotiation automatically.
Is Cloudinary free?
Cloudinary offers a generous free tier that is sufficient for most small to medium projects. For high-traffic sites, it is a paid solution that pays for itself through bandwidth savings and conversion gains.
Should images be compressed BEFORE uploading to Next.js?
Ideally, yes. Even if Next.js optimizes display, storing 10MB originals on your server wastes disk space unnecessarily. A quick pass through TinyPNG before upload is good digital hygiene.
🌱Eco-designed site