feat: Optimize image handling for OnTicket tenant

- Added migration to optimize OnTicket images using OptimizeOnticketImagesSeeder.
- Updated OnTicketTenantSeeder to reference optimized image formats (AVIF).
- Modified OnticketImmersiveHeroCarouselSeeder to use AVIF images for hero carousel.
- Created OptimizeOnticketImagesSeeder to replace existing attachments with optimized images.
- Adjusted TestEventsSeeder to utilize AVIF images for events.
- Updated tests to verify the correct image formats and ensure optimized images are stored.
- Added new image files in AVIF format for logos, backgrounds, and event images.
This commit is contained in:
2026-09-22 10:01:05 -03:00
parent a4a8a3ef8f
commit c90a393081
22 changed files with 213 additions and 20 deletions

View File

@@ -44,7 +44,7 @@ class TenantSeederTest extends TestCase
$this->assertSame('onticket_logo.png', $tenant->headerLogo->filename);
$this->assertSame('onticket_footer_logo.png', $tenant->footerLogo->filename);
$this->assertSame('onticket_favicon.svg', $tenant->favicon->filename);
$this->assertSame('onticket_header_background.png', $tenant->headerBackgroundImage->filename);
$this->assertSame('onticket_header_background.avif', $tenant->headerBackgroundImage->filename);
foreach ([$tenant->headerLogo, $tenant->footerLogo, $tenant->favicon, $tenant->headerBackgroundImage] as $attachment) {
Storage::disk('s3')->assertExists($attachment->path);
@@ -56,12 +56,12 @@ class TenantSeederTest extends TestCase
$imageIds = $carousel->config;
$this->assertCount(8, $imageIds);
$this->assertSame([
'onticket_hero_carousel_1.png',
'onticket_hero_carousel_2.png',
'onticket_hero_carousel_1.avif',
'onticket_hero_carousel_2.avif',
'onticket_hero_carousel_3.avif',
'onticket_hero_carousel_4.jfif',
'onticket_hero_carousel_5.jfif',
'onticket_hero_carousel_6.jfif',
'onticket_hero_carousel_4.avif',
'onticket_hero_carousel_5.avif',
'onticket_hero_carousel_6.avif',
'onticket_hero_carousel_7.avif',
'onticket_hero_carousel_8.avif',
], array_map(fn (int $id): string => Attachment::query()->findOrFail($id)->filename, $imageIds));