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

@@ -10,13 +10,15 @@ use RuntimeException;
class OnticketImmersiveHeroCarouselSeeder extends Seeder
{
private const IMAGE_DIRECTORY = 'images/tennants/onticket_otpimizado/onticket_tennant_hero_carousel';
private const IMAGES = [
'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',
];
@@ -39,7 +41,7 @@ class OnticketImmersiveHeroCarouselSeeder extends Seeder
}
$images = array_map(function (string $filename): UploadedFile {
$path = public_path("images/tennants/onticket/onticket_tennant_hero_carousel/{$filename}");
$path = public_path(self::IMAGE_DIRECTORY."/{$filename}");
if (! is_file($path)) {
throw new RuntimeException("Image not found at path: {$path}");