© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•10mo ago•
6 replies
Georgi Arnaudov

Spatie Media Library blurred image preview

What I am trying to do: Preview successfully uploaded image/s

What I did: I've upgraded filament admin panel to v3, more specifically
^3.2
^3.2
. Along with it I've updated
"filament/spatie-laravel-media-library-plugin": "^3.2"
"filament/spatie-laravel-media-library-plugin": "^3.2"
. My theme compiles correctly and everything else worked like a charm.

My issue: The uploaded image/s are blurred, or the entire preview is cut out. The bug where the whole preview is cut out appears when I reload the page, visit some other tabs and then open the images tab.

Code:

Product model
public function registerMediaCollections(): void
    {
        $this
            ->addMediaCollection('products')
            ->useDisk('products');
    }

    public function registerMediaConversions(?Media $media = null): void
    {
        $this->addMediaConversion('thumb')
            ->width(240)
            ->height(270);

        $this->addMediaConversion('medium')
            ->width(400);
    }
public function registerMediaCollections(): void
    {
        $this
            ->addMediaCollection('products')
            ->useDisk('products');
    }

    public function registerMediaConversions(?Media $media = null): void
    {
        $this->addMediaConversion('thumb')
            ->width(240)
            ->height(270);

        $this->addMediaConversion('medium')
            ->width(400);
    }


Product resource:
Tabs\Tab::make('Снимки')
    ->schema([
        SpatieMediaLibraryFileUpload::make('media')
            ->collection('products')
            ->disk('products')
            ->multiple()
            ->image()
            ->maxFiles(10)
            ->hiddenLabel()
    ]),
Tabs\Tab::make('Снимки')
    ->schema([
        SpatieMediaLibraryFileUpload::make('media')
            ->collection('products')
            ->disk('products')
            ->multiple()
            ->image()
            ->maxFiles(10)
            ->hiddenLabel()
    ]),
Screenshot_2025-05-05_at_20.25.45.png
Screenshot_2025-05-05_at_20.26.11.png
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Spatie Media Library - Image Preview Layout
FilamentFFilament / ❓┊help
2y ago
Replicate images - Spatie Media Library Image
FilamentFFilament / ❓┊help
3y ago
Spatie preview image?
FilamentFFilament / ❓┊help
3y ago
Spatie Media Library
FilamentFFilament / ❓┊help
10mo ago