Skip to content

Commit 85f461e

Browse files
simonhampclaude
andauthored
Constrain admin plugin logo size to recommended 256x256 dimensions (#349)
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 75bde08 commit 85f461e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)