nuxt / nuxt/image

How to get ipx working with routeRules proxy

Open
#1,243 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.5k
Forks
331
Avg merge
19h 52m
Merged PRs (30d)
9

Description

I have a routeRules setup to proxy /storage requests to an api.

routeRules: {
    '/_storage/**': { proxy: 'https://localhost:3050/_storage/**' },
  },

When referencing the image, using nuxt-picture and ipx I get an image cannot be found error.

<nuxt-picture
   src="/_storage/public/test3.png"
/>

IPX path

/_ipx/w_3072&f_png/_storage/public/test3.png

IPX response

{
  "error": {
    "message": "[404] [IPX_FILE_NOT_FOUND] File not found: /_storage/public/test3.png"
  }
}

How would I go about supporting this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with the routeRules proxy configuration and the nuxt-picture/IPX request path shown in the report; reproduce the 404 for /_storage/public/test3.png. Trace whether the proxied source is available to IPX, and consider the issue complete when that image is successfully transformed and returned through the supported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
performance, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.