<?php

namespace Tricks\MediaLibraryOverrides\ResponsiveImages;

use Spatie\MediaLibrary\ResponsiveImages\ResponsiveImageGenerator;

class WidthOnlyResponsiveImageGenerator extends ResponsiveImageGenerator
{
    protected function addPropertiesToFileName(string $fileName, string $conversionName, int $width, int $height, string $extension): string
    {
        $fileName = pathinfo($fileName, PATHINFO_FILENAME);

        return "{$fileName}___{$conversionName}_W{$width}_H.{$extension}";
    }
}
