saleor / storefront

Saleor Storefront built with React 18, Next.js 14, App Router, TypeScript, GraphQL, and Tailwind CSS.
https://storefront.saleor.io
BSD 3-Clause "New" or "Revised" License
1.01k stars 585 forks source link

image src not correct #1075

Closed cyh-ustc closed 6 months ago

cyh-ustc commented 6 months ago

Summary

i try to test storefront but it seems that the image src is not correct

although i set NEXT_PUBLIC_SALEOR_API_URL

but the image src url is always localhost:8000

src="/_next/image?url=http%3A%2F%2Flocalhost%3A8000%2Fthumbnail%2FUHJvZHVjdE1lZGlhOjM0%2F1024%2Fwebp%2F&w=3840&q=75"

3

Steps to reproduce

git clone https://github.com/saleor/storefront.git
cd storefront
export NEXT_PUBLIC_SALEOR_API_URL=http://api.store.cyh.ac.cn/graphql/
pnpm i
pnpm dev
cat .env

NEXT_PUBLIC_SALEOR_API_URL=http://api.store.cyh.ac.cn/graphql/
# make sure to add it on production for correct canonical URLs
NEXT_PUBLIC_STOREFRONT_URL=http://localhost:3000

A link to a reproduction repository

No response

Output from envinfo

No response