Here's how to install the optimizers on MacOS (using Homebrew): brew install jpegoptim Here's how to install all the optimizers on Ubuntu: sudo apt-get install jpegoptim The addon will use the following optimizers if they are available on your system: It provides an option to run the optimization process on all Assets again.įinally, it adds a please optimize:images Command which optimizes all your existing image Assets and clears the Glide cache. It also adds a Utility screen, where you can view all optimization gains as well as the addon's current settings and configured optimizers. This addon dynamically adds a Fieldtype to the Asset editor, with which you can the image optimization gains and run optimizations on it. In this file you can configure whether the addon should automatically optimize image Assets, whether it should optimize Glide image manipulations, whether it should log detailed information about those optimizations and which optimizer commands it should run on which types of images. ImageOptimizer comes with a configuration file, which you can find at config/statamic/imageoptimizer.php after publishing the assets. It will just be known as 'Statamic ImageOptimizer' going forward. Much like Statamic is now just 'Statamic', the 'v3' part was dropped from this addon's name repository, etc. Please note that before Statamic 4 was unleashed this addon was available as 4rn0/statamic-v3-image-optimizer. Php artisan vendor:publish -provider="Arnohoogma\StatamicImageOptimizer\ServiceProvider" -force * * Possible values: 'lazy', 'eager', 'auto' or null if you don't want to set any loading instruction.Composer require 4rn0/statamic-image-optimizer Here you can set the default * value of that attribute. */ 'enable_vapor_uploads' => env ( 'ENABLE_MEDIA_LIBRARY_VAPOR_UPLOADS', false ), /* * When converting Media instances to response the media library will add * a `loading` attribute to the `img` tag. */ 'media_downloader' => Spatie\MediaLibrary\Downloaders\DefaultDownloader ::class, 'remote' =>, ], 'responsive_images' =>, /* * When enabling this option, a route will be registered that will enable * the Media Library Pro Vue and React components to move uploaded files * in a S3 bucket to their right place. * This is particularly useful when the url of the image is behind a firewall and * need to add additional flags, possibly using curl. */ 'jobs' =>, /* * When using the addMediaFromUrl method you may want to replace the default downloader. Make sure * your custom jobs extend the ones provided by the package. */ 'ffmpeg_path' => env ( 'FFMPEG_PATH', '/usr/bin/ffmpeg' ), 'ffprobe_path' => env ( 'FFPROBE_PATH', '/usr/bin/ffprobe' ), /* * Here you can override the class names of the jobs used by this package. */ 'image_driver' => env ( 'IMAGE_DRIVER', 'gd' ), /* * FFMPEG
0 Comments
Leave a Reply. |