Can you help me displaying image by indexColumn

hello everyone trying to display image by indexColumns return me
dataimagegif;base64,R0lGODlhA
dataimagegif;base64,R0lGODlhA
like in picture
39 Replies
ifox
ifox2y ago
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?
Mateo
Mateo2y ago
here is my model controller and medias
ifox
ifox2y ago
@Mathew and it doesn't work?
Mateo
Mateo2y ago
no is not displaying the picture i dont know why
ifox
ifox2y ago
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!
Mateo
Mateo2y ago
how do i do now should i use it withot max value
ifox
ifox2y ago
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
Mateo
Mateo2y ago
is not working yet and after i remove max
ifox
ifox2y ago
Your field is image You are using imageS in the indexColumns
Mateo
Mateo2y ago
i changed it to image everywhere and is not working
ifox
ifox2y ago
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 record
Mateo
Mateo2y ago
form page and image in twill.php
Mateo
Mateo2y ago
this form page is after save
Mateo
Mateo2y ago
table database
ifox
ifox2y ago
this is all looking good, are you sure you changed it here:
ifox
ifox2y ago
Mateo
Mateo2y ago
yes i did it im sure
ifox
ifox2y ago
well, ok, then I don't know and will need to reproduce if it's a bug
Mateo
Mateo2y ago
isnt any other configuration in .env file or something i shoud add to twill.php
ifox
ifox2y ago
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
Mateo
Mateo2y ago
it meand everything is correct by my side where do i put it
ifox
ifox2y ago
I'm not sure what you mean, I didn't say you should put something anywhere
Mateo
Mateo2y ago
sorry for the block editor crop where do i put that crop if not there
Mateo
Mateo2y ago
i saw the console now maybe is this an issue
Mateo
Mateo2y ago
?
ifox
ifox2y ago
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?
Mateo
Mateo2y ago
im using Local
Mateo
Mateo2y ago
yes i runed php artisan storage:link
Mateo
Mateo2y ago
Mateo
Mateo2y ago
i created a new project for test and the same thing
ifox
ifox2y ago
Can you share that new project so I can reproduce?
Mateo
Mateo2y ago
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.
Mateo
Mateo2y ago
this time i am using glide
ifox
ifox2y ago
This line should be 'default'
ifox
ifox2y ago
GitHub
indexColumn/Fleet.php at main · mateodemirlika/indexColumn
Contribute to mateodemirlika/indexColumn development by creating an account on GitHub.
Mateo
Mateo2y ago
i changet it and the same result it doesn't display what do i do becouse i changed the value to FleetController to default
ifox
ifox2y ago
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
Mateo
Mateo2y ago
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