displaying responsive images using SpatieMediaLibrary plugin for filament
i installed this package a few days ago and updated my Post model accordingly, everything went okay, ran the migrations to no problem, etc but i don't understand how to utilize the responsive images that get created.
from the form i can preview the image and the responsive images all of them are generated on my storage folder, but once i get to the front-end those responsive images arent attached on the page.
output on the html:
Post.php
this is what i have on the form:
this is what i have on the table function and i can't see the thumbnail there,
im using version : * 10.11.3 of the plugin and im currently at v2.17.52 of filament.
6 Replies
hi @josef
Ok, just to understand. Are you not getting the correct images in the frontend, or in the table?
Front end
@josef
But also on the table
So both but i want to fix the front end first
How are you getting the images on the frontend? Can you share some code? You're using a collection, but for the image column you're not specifying the collection
getting the images from my controller like this:
blade:
I think this is working, but i have other variables like $categories which uses another table "categories" along with eloquent and sql conditions providing me with a "distinct result" for the homepage but how could i use $postImages for other variables? trait? how would that look like?
but yeah i think it worked might be the case for another question? 😄
🫡