Skip to content

(via dimitrieh): Replace eager img with lazy NuxtImg for from-prototype-to-production ima - #5848

Merged
macroscopeapp[bot] merged 2 commits into
nuxt/platformfrom
macroscope/nuxt/platform
Sep 24, 2026
Merged

macroscopeapp[bot] merged 2 commits into
nuxt/platformfrom
macroscope/nuxt/platform

Conversation

@macroscopeapp

@macroscopeapp macroscopeapp Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR includes two performance and SSR improvements for the website.

Changes

1. Lazy-load "from-prototype-to-production" image with NuxtImg

Replaced the static <img> tag with <NuxtImg> component for the from-prototype-to-production image:

  • Added format="webp" for modern, optimized image delivery
  • Added loading="lazy" to defer loading until the image enters the viewport
  • Preserves existing image path, alt text, width, styling classes, and desktop-only rendering

2. Fix LiteYoutube component SSR stylesheet registration

Updated nuxt/components/LiteYoutube.vue to use Nuxt's useHead() composable instead of onMounted() DOM manipulation:

  • The lite-youtube-embed stylesheet and script are now registered in an SSR-safe way
  • Ensures layout/poster CSS is present in the initial HTML render
  • Fixes styling issues on pages like /platform/why-flowfuse where the component's styles weren't applied during server-side rendering

Note

Macroscope: Fix It For Me

  • This PR originated from this comment in platform: serve /platform/ from Nuxt #5782.
  • Since auto-merge is on, Macroscope will merge this PR after waiting for checks to pass.
  • If you'd rather not wait, you can always merge this yourself but no further action from you is currently needed.
  • You can also @mention Macroscope in this PR to request further changes.

Activity

Currently: Auto-merged f675234

Previously

Note

Replace eager img with lazy NuxtImg in why-flowfuse page and move LiteYoutube assets to SSR head

  • Replaces the native <img> for the prototype-to-production image on why-flowfuse.vue with NuxtImg, requesting width 496, WebP output, and lazy loading
  • Moves the lite-youtube stylesheet and script registration in LiteYoutube.vue from client-only mounted hooks to SSR-aware useHead, so the assets appear in the initial SSR HTML instead of being injected after mount
  • Preserves the stylesheet's cross-origin and referrer-policy settings and the script's async loading behavior
  • Risk: LiteYoutube assets now load on every SSR page render where the component appears, which may increase initial HTML payload size versus the previous client-only injection

Macroscope summarized d4647c4.

@macroscopeapp
macroscopeapp Bot merged commit f675234 into nuxt/platform Sep 24, 2026
2 checks passed
@macroscopeapp
macroscopeapp Bot deleted the macroscope/nuxt/platform branch September 24, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant