Replies: 1 comment
-
I'm aware this post is a little old now, but I came across it whilst trying to figure out the exact same thing. This is what seems to work for me (Using v10.7):
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My (user)object has 2 conversions:
` public function registerMediaConversions(Media $media = null): void
{
$this
->addMediaConversion('preview')
->optimize()
->height(100)
->nonQueued();
My object olso has 2 collections, , see:
` public function store(ProfileRequest $request)
{
$user = Auth::user();
When i try to display a responsive image with:
{{ $user->getFirstMedia('optimized') }}`, nothing is outputtedI think is is because laravel-medialibrary does not know from wich collection ('avatar' or 'profileImages') to display the media conversion.
What am i missing here?
How to fix?
Beta Was this translation helpful? Give feedback.
All reactions