strapi / strapi-starter-gatsby-corporate

strapi-starter-gatsby-corporate-git-main-strapijs.vercel.app
MIT License
27 stars 8 forks source link

Image loading issues (from API instead of /static directory) #26

Open cotwitch opened 3 years ago

cotwitch commented 3 years ago

Images from Hero section/component are loading directly from API (http://localhost:1337/) (even after production build, not just in development build/mode) instead of /static directory (so, they are not loading from the same origin as document).

In my opinion, Hero image url should be like/similar to this (at least in production build): http://localhost:9000/static/86094482dc28029a49699c79480324a1/5c116/undraw_content_team_6e56ee7872.avif

For example, logo image in top navigation bar is loading from /static directory (same origin as document) with no issues.

(As far as I know, Gatsby site should be completely generated and cached in its static form, so API shouldn't be needed at all when running the site - i.e. I don't need "leads form" functionality to be working...).

(note: I'm using original starter code, right after installation, without any code changes)

image

image

cotwitch commented 3 years ago

@markkaylor Mark, please, could you kindly tell me, if my issue is valid? Kindly thank you for any information ;)

markkaylor commented 3 years ago

Hi @cotwitch, I will try to take a look before the end of the week. If you would like to submit a PR for a proposed fix that could also help move things along. Sorry for the delay

cotwitch commented 2 years ago

@markkaylor You're very welcome! 😉👍

Actually, I'm still looking for a solution and I would really appreciate any progress on this. 🙇

So, if you have some spare-time, is there a chance that you could manage to handle this eventually?

Kindly regards