outl1ne / nova-media-hub

This Laravel Nova package allows you to manage media and media fields.
MIT License
45 stars 22 forks source link

Conversion start from thumbnail version #37

Closed trippo closed 1 year ago

trippo commented 1 year ago

If I configure nova-media-hub to generate a thumbnail version for all collections, and after I add for each collection a medium conversion. When I upload an image, the conversion tool starts from the thumbnail version to crop the medium conversion. The tool must start every time from the original image, otherwise i obtain photos like this: Original: chiara_s Thumbnail: chiara_s thumbnail Medium: chiara_s medium

Tarpsvo commented 1 year ago

Can I see your config please?

trippo commented 1 year ago
'image_conversions' => [
        '*' => [
            'thumbnail' => [
                // Image format, null for same as original
                // Other options: jpg, pjpg, png, gif, webp, avif, tiff
                'format' => null,
                'width' => 150,
                'height' => 150,
                'fit' => Manipulations::FIT_CROP,
            ]
        ],
        'home' => [
            'medium' => [
                'format' => null,
                'width' => 1200,
                'height' => 1200,
                'fit' => Manipulations::FIT_MAX,
            ]
        ],
        'banner' => [
            'medium' => [
                'format' => null,
                'width' => 1400,
                'height' => 600,
                'fit' => Manipulations::FIT_CROP,
            ]
        ],
Tarpsvo commented 1 year ago

Heya @trippo! The logic was indeed a bit scuffed - all the optimizations were run on the same local file. It should now be fixed in version 1.5.3. Please give it a try and report back. Thanks!

trippo commented 1 year ago

Now work fine thanks