F
Filamentā€¢2mo ago
EL REKT

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
No description
20 Replies
awcodes
awcodesā€¢2mo ago
What console error are you seeing for the missing image?
Dennis Koch
Dennis Kochā€¢2mo ago
Looks like your image is not public or storage is not linked
EL REKT
EL REKTā€¢2mo ago
there is nothing in the console
awcodes
awcodesā€¢2mo ago
There has to be. šŸ™‚ otherwise the image would be loading.
EL REKT
EL REKTā€¢2mo ago
Images that are not successfully displayed are in the same folder as images that are successfully displayed
awcodes
awcodesā€¢2mo ago
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.
EL REKT
EL REKTā€¢2mo ago
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
awcodes
awcodesā€¢2mo ago
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
EL REKT
EL REKTā€¢2mo ago
the console error went away, but still didn't fix the problem
awcodes
awcodesā€¢2mo ago
Make sure youā€™re not caching any views or components and that the browser hasnā€™t cached the response.
EL REKT
EL REKTā€¢2mo ago
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
awcodes
awcodesā€¢2mo ago
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.
EL REKT
EL REKTā€¢2mo ago
yes this 'images' data is in a relation... so I display the relation data via RepeatableEntry like this:
No description
EL REKT
EL REKTā€¢2mo ago
btw 'surveyed' is the name of the relationship
awcodes
awcodesā€¢2mo ago
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.
Want results from more Discord servers?
Add your server