#Pictures load return a 200 in prod but are not there.

17 messages · Page 1 of 1 (latest)

cinder plaza
#

I was loading a picture like so:

  <img src="/images/chesier.png" alt="{headerAlt}" class="w-full" width="2500" height="1389" />

weirdly when I check with pnpm run serve and pnpm preview everything works fine.

On Prod everything seems to work fine but the pictures are not there. But they respond with a 200?
Maybe I am doing it in the wrong way.

full fractal
#

In the network tab there if you click on the image, what does the response tab show you?

cinder plaza
#

The funny thing is that my favicon is in the same folder and it is there but the images that are in subfolder are not. My Fonts get loaded as well.

full fractal
#

very strange! ok one quick question then as well - what's the 'preview tab' in that network tab look like as well? @cinder plaza

#

Actually I saw it directly. Looks like the images themselves get corrupted. This is gonna sound funky but are you developing on windows linux or mac?

full fractal
#

Successful response but corrupted image

cinder plaza
#

And the server is Linux

full fractal
#

Interesting 🤔 How does it get built/pushed to prod?

cinder plaza
#

Github actions and into a Docker Node Container

full fractal
#

Well I'm deifnitely not immediately like "oh I know this exact issue" but I'd want to start to rule out things if I were in your case. I'd be curious to see if you ran the prod docker image locally if you get the same problem. And then if you run it as a dev server or even preview, but within the docker image, if you see the same problem.

I've had qwik apps on cloudflare edge, vercel edge, and just a regular NodeJS box running on Railway - haven't had any issues with images.

#

Oh that makes me want to just double check - which adapter are you using to run it? I'm assuming you're using either express or fastify yeah?

cinder plaza
#

fastify

#

I followed there instructions basically and then just added the Docker

#

yeah I guess I will have to build the container locally and check what is happening there. as you said and maybe test with the preview command as well

cinder plaza
#

Tested it locally and the container runs perfectly fine with the images. Could it be that it has something to do with the QwikCity CSRF attacks protection? I did put the Origin variable but still.