Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Flynsarmy/wn-imageoptimizer-plugin
Optimizes images automatically on upload/resize
https://github.com/Flynsarmy/wn-imageoptimizer-plugin
Last synced: about 1 month ago
JSON representation
Optimizes images automatically on upload/resize
- Host: GitHub
- URL: https://github.com/Flynsarmy/wn-imageoptimizer-plugin
- Owner: Flynsarmy
- Created: 2022-03-12T09:46:07.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-12T10:03:56.000Z (almost 3 years ago)
- Last Synced: 2024-08-01T19:43:12.139Z (5 months ago)
- Language: PHP
- Size: 11.7 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-wintercms - Flynsarmy.ImageOptimizer - Automatically optimizes images on upload/resize. (Uncategorized / Uncategorized)
README
# Image Optimizer for Winter CMS ![Build Status](https://github.com/flynsarmy/wn-imageoptimizer-plugin/actions/workflows/ci-php.yml/badge.svg)
Automatically optimizes images on upload/resize.
## Installation
* `git clone` to */plugins/flynsarmy/imageoptimizer*
* `composer update`
* `php artisan plugin:refresh Flynsarmy.ImageOptimizer`## Description
This plugin uses [spatie/image-optimizer](https://github.com/spatie/image-optimizer) to optimize images on upload and resize. It requires various binaries to be installed on your system to handle the optimizations. At the time of writing this plugin supports the following image types:
* JPG - [JpegOptim](http://freecode.com/projects/jpegoptim)
* PNG - [Pngquant 2](https://pngquant.org/), [Optipng](http://optipng.sourceforge.net/)
* SVG - [SVGo 1](https://github.com/svg/svgo)
* GIF - [Gifsicle](http://www.lcdf.org/gifsicle/)
* WebP - [Cwebp](https://developers.google.com/speed/webp/docs/cwebp)For full details, see [spatie/image-optimizer](https://github.com/spatie/image-optimizer)
A settings page has been provided at *Backend - Settings - Image Optimizer* which lists supported binaries and whether or not they're installed on the system.
## Command Line
Two artisan commands have been added:
1. `php artisan imageoptimizer:optimizers` lists installed optimizers.
1. `php artisan imageoptimizer:optimize ` optimizes an image at a given path.