ImageEntry does not display images
My data is in array form like this :
[
"uploads\/ticket-images\/progress\/BQv2jKNamipq3wsEDGR6pgfA6oyrq55BGwxHndxP.jpg",
"uploads\/ticket-images\/progress\/KWP0uw6VyVrC5ikG9fD8dWwkpQZUEI3cw9XfN6to.jpg"
]
and this is my way to display it to ImageEntry :
Infolists\Components\ImageEntry::make('images')->grow(true)->circular()->stacked(),
In some resources this method works, but this time it doesn't work... what's wrong?![No description](https://cdn.answeroverflow.com/1263959495894106285/image.png)
![No description](https://cdn.answeroverflow.com/1263959496355614741/image.png)
20 Replies
What console error are you seeing for the missing image?
Looks like your image is not public or storage is not linked
there is nothing in the console
There has to be. š otherwise the image would be loading.
Images that are not successfully displayed are in the same folder as images that are successfully displayed
The browser is saying that it canāt load the image some something either off with the url or there could be a permissions issue for the file, or could even be a CORS issue. We have no way of troubleshooting that without the devtools console output.
there is only this on the console, I think it is not related to this case..and the images can be accessed via the link directly in a web browser
![No description](https://cdn.answeroverflow.com/1263975441367175329/image.png)
Ok. So for some reason those images are trying to load over http instead of https.
Make sure the app url in your env has https
the console error went away, but still didn't fix the problem
Make sure youāre not caching any views or components and that the browser hasnāt cached the response.
I tried this just now:
1. clear browser data (cache, etc.)
2. display the data in TextEntry (because I was afraid the data would be empty, but it turns out it's not.)
3. Check via inspect element, it turns out src (source) is empty
Is āimagesā a relationship in this case where it isnāt working. At this point, I would have to see more of the code to be able to help.
But given that itās working in some cases and not others, I doubt that itās directly a filament issue.
yes this 'images' data is in a relation... so I display the relation data via RepeatableEntry like this:
![No description](https://cdn.answeroverflow.com/1263983298884145172/image.png)
btw 'surveyed' is the name of the relationship
If itās a relationship shouldnāt it be something like make(āimages.pathā)?
Iām starting the think the relationship is off possibly.
If itās a relationship then images has to have a db column name for the path.