Skip to content

fix(useStrapiMedia): use public URL during server rendering - #558

Open
BayBreezy wants to merge 1 commit into
nuxt-modules:mainfrom
BayBreezy:fix/388-public-media-url
Open

BayBreezy wants to merge 1 commit into
nuxt-modules:mainfrom
BayBreezy:fix/388-public-media-url

Conversation

@BayBreezy

Copy link
Copy Markdown
Contributor

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

With separate internal and public Strapi URLs, generated pages can contain localhost media URLs. useStrapiMedia selected the private URL during server rendering. It now resolves relative media paths against the public URL consistently, so SSR and generated pages emit browser-accessible media URLs. Absolute URLs remain unchanged. Fixes #388.

Verified: lint, typecheck, all 45 tests (including SSR and prerender regressions), and build.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

@pkg-pr-new

pkg-pr-new Bot commented Oct 16, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxtjs/strapi@558

commit: 79f01c9

This branch has not been deployed

No deployments
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.

Generating static output gives localhost adress

1 participant