Open martin-ro opened 3 years ago
@martin-ro Hi. Looks like it's a bug. I'll look into it.
Hi, any idea where the issue might be? I can try to find a solution.
@dmitrybubyakin
Is there where the problem might be? https://github.com/dmitrybubyakin/nova-medialibrary-field/blob/afaa894ddde69f0006d355f18c0bf8bf9811f8b9/resources/js/components/Medialibrary/MediaPreview.vue#L31-L37
@bilogic I think it's ok. It might be something else.
I see.. sorry I don't know Vue, can't help much.
This is method is not even available in my version, for some reason, and downloaded this a few days ago. Is this available only on the dev branch?
I figured that useFallbackUrl is media-library specific method. So, I can, also, testify that it doesn't use the fallback URL when you delete an image.
@dmitrybubyakin I couldn't find the code, but could the problem be that getMedia returns an empty collection when there is no media even when using useFallbackUrl. I think that you have to make a call to getFirstMediaUrl($collectionName) to get the fallback url.
@dmitrybubyakin I also managed to get fallbackUrl
working and have the same conclusion as @petethewizard. Don't think this is a bug.
When using a fallack url no image is displayed. For example on a model like so:
The image field is blank. I also wasnt able to get it to work with the
previewUsing
andmediaOnIndex
methods.Any idea what the issue is? Thanks!