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:
@@ -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}");
|
||||
|
||||
Reference in New Issue
Block a user