Can you help me displaying image by indexColumn
hello everyone trying to display image by indexColumns return me like in picture
39 Replies
Hi @Mathew what is the name of the medias field you're trying to render and the code you're using in indexColumns to render it?
here is my model controller and medias
@Mathew and it doesn't work?
no is not displaying the picture
i dont know why
looks like it could be that your medias field is a multiple selection since you have max at 5. Usually we use the thumbnail for a single medias field, but multiple should be supported as well. If not, we'll fix it!
how do i do now should i use it withot max value
well that depends on your use case with that field for your frontend. If you are not going to render multiple images you can remove max
delete the selection and save, remove the max, reload the page, select an image, and it should then show up on the index
I feel like it's probably a different issue though
I can't see why it wouldn't render even with multiple, it'd just take the first one
taking a look at sources one sec
Yeah I can confirm the max option shouldn't prevent the thumbnail to work
Oh I see your issue now
is not working yet and after i remove max
Your field is image
You are using imageS in the indexColumns
i changed it to image everywhere and is not working
is the image field saving correctly ? Can I see a screenshot of the field on the form page? And do you see rows in the
mediables
table for this recordform page and image in twill.php
this form page is after save
table database
this is all looking good, are you sure you changed it here:
yes i did it im sure
well, ok, then I don't know and will need to reproduce if it's a bug
isnt any other configuration in .env file or something i shoud add to twill.php
no, this should work out of the box since you have it all working on the form
You don't need that block editor crops configuration btw, since that field is not in a block
it meand everything is correct by my side
where do i put it
I'm not sure what you mean, I didn't say you should put something anywhere
sorry for the block editor crop
where do i put that crop if not there
i saw the console now maybe is this an issue
?
you would put it where you already have it, i was just saying that the field you're working on right now is not in a block, so it's irrelevant to the issue. If you are using blocks and one of your block is using a medias field with that name, it needs to be there. But again, in the case we were trying to solve, that configuration is coming from the model $mediasParams which you correctly have. However I'm not sure why you are using multiple crops if you set all their ratios to null. Do you actually need those crops?
Regarding the console error, it seems like your images are rendering on 127.0.0.1 when your app is running on localhost? Did you change the glide base url? I feel like the issue is not with code but your overall configuration
did you run php artisan storage:link?
Which image rendering service class are you using?
im using Local
yes i runed php artisan storage:link
i created a new project for test and the same thing
Can you share that new project so I can reproduce?
yes of course now i pushed to github repository https://github.com/mateodemirlika/indexColumn
GitHub
GitHub - mateodemirlika/indexColumn
Contribute to mateodemirlika/indexColumn development by creating an account on GitHub.
this time i am using glide
GitHub
indexColumn/FleetController.php at main · mateodemirlika/indexColumn
Contribute to mateodemirlika/indexColumn development by creating an account on GitHub.
This line should be 'default'
GitHub
indexColumn/Fleet.php at main · mateodemirlika/indexColumn
Contribute to mateodemirlika/indexColumn development by creating an account on GitHub.
i changet it and the same result
it doesn't display
what do i do becouse i changed the value to FleetController to default
I will try your repo later and get back to you. from looking at the code that is what was incorrect, but there may be something else I haven't noticed
hello, I just set up a twill project live and when I try to login to the log in dashboard panel it redirects to login page again
no errors in console