Skip to content

Product images never load in the storefront #8

Description

@PhilippTheServer

The API returns each item's image as an API-relative path, e.g. media.main_image: "/v1/items/{uuid}/image". The storefront puts that path straight into <img src>, so the browser asks the storefront's own origin (/v1/…) instead of the API behind /api. nginx answers with index.html, and every product card, product page and cart line shows a broken or empty image, even for items that have an uploaded image.

Reproduce: upload an image for an item (PUT /v1/items/{uuid}/image), open /shop: the image is broken; curl localhost:4300/api/v1/items/{uuid}/image returns the PNG.

Expected once solved: API-relative media paths (main_image and gallery) are resolved against the configured apiUrl when items are loaded, so product images show on the shop grid, product page and cart; absolute URLs are left untouched; a unit test fails if the mapping regresses.

Activity

  1. added a commit that references this issue on Sep 23, 2026
    e74e6ef
  2. PhilippTheServer commented on Sep 23, 2026

    @PhilippTheServer
    ContributorAuthor

    Solved in #9: ApiService resolves API-relative media paths (main_image, gallery) against apiUrl, so images load through /api on the shop grid, product page and cart. New api.service.spec.ts fails if the mapping regresses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions