Images in production do not load. #190
Replies: 16 comments
-
@MaickDavila La próxima vez escribe en inglés para que otras personas lo puedan entender sin tener que saber Español (en el peor de los casos, vas a Google Translate y pegas la traducción tal cual, y así te entenderemos todos). ¿Has incluido tus propias imágenes o son las de la plantilla? ¿En que entorno estás probando, en local o en un servidor? |
Beta Was this translation helpful? Give feedback.
-
in development mode everything is fine, but when testing the page for example in Netlify they do not load the images. I have a "Media" folder where I put my images, and in the components I call them like this: "~ / media / images / carrousel / banner1.jpg". |
Beta Was this translation helpful? Give feedback.
-
@MaickDavila try test with |
Beta Was this translation helpful? Give feedback.
-
the test link is this https://epic-albattani-99e483.netlify.app/ |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@MaickDavila move the media directory to See this entry https://vitejs.dev/guide/assets.html#importing-asset-as-url: the url for those assets will be On your url there is a lot of assets that do not exist, just see the network tab on dev tools. |
Beta Was this translation helpful? Give feedback.
-
@MaickDavila Have you test the build with the local preview? It shouldn't work... |
Beta Was this translation helpful? Give feedback.
-
@userquin When doing build, it does not compile the asset images. |
Beta Was this translation helpful? Give feedback.
-
@MaickDavila what's the solution you apply, moving to assets directory or to public directory? Once the build finish, you can see the build on dist folder. |
Beta Was this translation helpful? Give feedback.
-
@MaickDavila is the repo public? |
Beta Was this translation helpful? Give feedback.
-
@userquin to the assets folder |
Beta Was this translation helpful? Give feedback.
-
@MaickDavila can you share you |
Beta Was this translation helpful? Give feedback.
-
@userquin I did not modify this file const markdownWrapperClasses = 'prose prose-sm m-auto text-left' export default defineConfig({
], server: { // https://github.com/antfu/vite-ssg optimizeDeps: { ` |
Beta Was this translation helpful? Give feedback.
-
@MaickDavila What about the |
Beta Was this translation helpful? Give feedback.
-
@MaickDavila move |
Beta Was this translation helpful? Give feedback.
-
@MaickDavila you can see the assets folder with the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I would love to know what I am failing or what I need to configure, when I do the Build, the images do not load on the page.
Thank you very much for the Template, it is excellent.
Beta Was this translation helpful? Give feedback.
All reactions