mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
DEV: Swap out optipng with oxipng (#15013)
* DEV: Swap out optipng with oxipng
The oxipng binary has been added to our base docker image here:
244c9cb110
oxipng is a rust replacement for optipng that provides increased
performance and multi-threading. Checkout
https://github.com/shssoichiro/oxipng for more info.
* add instructions for installing oxipng
This commit is contained in:
parent
648332bc9f
commit
da9cd4f692
|
@ -14,6 +14,12 @@ To get your Ubuntu 16.04 or 18.04 LTS install up and running to develop Discours
|
|||
sudo apt-get -yqq update
|
||||
sudo apt-get -yqq install software-properties-common vim curl expect debconf-utils git-core build-essential zlib1g-dev libssl-dev openssl libcurl4-openssl-dev libreadline6-dev libpcre3 libpcre3-dev imagemagick redis-server advancecomp jhead jpegoptim libjpeg-turbo-progs optipng pngcrush pngquant gnupg2
|
||||
|
||||
# oxipng
|
||||
mkdir /tmp/oxipng-install && cd /tmp/oxipng-install
|
||||
wget https://github.com/shssoichiro/oxipng/releases/download/v5.0.1/oxipng-5.0.1-x86_64-unknown-linux-musl.tar.gz
|
||||
tar -xzf oxipng-5.0.1-x86_64-unknown-linux-musl.tar.gz && cd oxipng-5.0.1-x86_64-unknown-linux-musl
|
||||
cp oxipng /usr/local/bin
|
||||
|
||||
# Ruby
|
||||
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
|
||||
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
|
||||
|
|
|
@ -225,7 +225,7 @@ In addition to ImageMagick we also need to install some other image related
|
|||
software:
|
||||
|
||||
```sh
|
||||
brew install jpegoptim optipng jhead
|
||||
brew install jpegoptim optipng oxipng jhead
|
||||
npm install -g svgo
|
||||
```
|
||||
|
||||
|
|
|
@ -116,7 +116,8 @@ class FileHelper
|
|||
timeout: 15,
|
||||
skip_missing_workers: true,
|
||||
# PNG
|
||||
optipng: { level: 2, strip: strip_image_metadata },
|
||||
oxipng: { level: 3, strip: strip_image_metadata },
|
||||
optipng: false,
|
||||
advpng: false,
|
||||
pngcrush: false,
|
||||
pngout: false,
|
||||
|
@ -128,7 +129,6 @@ class FileHelper
|
|||
# Skip looking for gifsicle, svgo binaries
|
||||
gifsicle: false,
|
||||
svgo: false,
|
||||
oxipng: false
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user