Alt-text for Spatie Medialibrary File Upload
I'm using Spatie Medialibrary to handle my uploads. However I just noticed there is no way to set the alt-text of an image when I use
SpatieMediaLibraryFileUpload
.
How do I implement a way to add alt-text to an image through SpatieMediaLibraryFileUpload? It's so weird there is no built-in way to do this, especially since the new accessibility laws in EU will take effect soon.1 Reply
Not sure if this would belong on the FileUpload component to be honest but if you mean the ImageColumn you can use
->extraImgAttributes([])
otherwise you might look into adding custom properties for that see: https://filamentphp.com/plugins/filament-spatie-media-library#adding-custom-properties
That would still leave you with the task to ensure it gets added to the image when showingFilament
Spatie Media Library by Filament - Filament
Filament support for Spatie's Laravel Media Library package.