strapi-starter-gatsby-corporate icon indicating copy to clipboard operation
strapi-starter-gatsby-corporate copied to clipboard

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

Open cotwitch opened this issue 2 years ago • 3 comments

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 avatar Oct 24 '21 22:10 cotwitch