IPX causing issues
Hello I have an image 428x200, its used as a logo on the site.
for testing I have set the sizes="210px" however the images generated by ipx aren't returning the proper icon. instead it returns the "missing image" icon
3 Replies
Hi @Just Simeon. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I'll help you troubleshoot your IPX image issue in Nuxt. There are several common reasons why IPX might be returning a "missing image" icon instead of your logo:
1. Image location: By default, IPX looks for images in the
public/
directory. If your image is in another location, you need to configure the dir
option.
As mentioned in the Nuxt Image configuration docs, changing this from the default public
directory can cause issues with some providers.
2. Image path: Make sure you're using the correct path format in your src
attribute. For images in the public directory, you should use an absolute path starting with /
:
Not:
3. Sharp installation: IPX uses Sharp for image processing. If you're seeing a 404 error with IPX_FILE_NOT_FOUND
or a 500 error mentioning Sharp, there might be an issue with the Sharp module installation, especially in production environments. This is indicated in one of the knowledge sources where a user encountered a similar error with Sharp module installation.
4. Check file format: Ensure your image is in a supported format (JPG, PNG, GIF, etc.).
If you're still having issues, you could try:
- Moving your image to the public/
directory if it's not already there
- Using the full path to your image
- Checking your browser's developer console for specific error messages
- Verifying that the image works with a regular <img>
tag
If you need more specific help, please provide the exact error message from your browser's console and the file path structure of your project.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@294593079812292609> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Hmm even weirder is that it works on the first try but when I then hard reload it doesnt.
It was caused by having this cache policy: