Skip to content

Commit 1cf1a82

Browse files
simonhampclaude
andcommitted
Constrain admin plugin logo size to recommended 256x256 dimensions
Use inline styles instead of Tailwind classes for the logo preview in the admin plugin edit form, since Filament's CSS build doesn't include classes from inline HTML strings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 960e4a2 commit 1cf1a82

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/Filament/Resources/PluginResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static function form(Schema $schema): Schema
5252
Forms\Components\Placeholder::make('logo_preview')
5353
->label('Logo')
5454
->content(fn (?Plugin $record) => $record?->hasLogo()
55-
? new HtmlString('<img src="'.e($record->getLogoUrl()).'" alt="Logo" class="w-16 h-16 rounded-lg object-cover" />')
55+
? new HtmlString('<img src="'.e($record->getLogoUrl()).'" alt="Logo" style="max-width: 256px; max-height: 256px; border-radius: 0.5rem; object-fit: cover;" />')
5656
: 'No logo')
5757
->visible(fn (?Plugin $record) => $record !== null),
5858

0 commit comments

Comments
 (0)