mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:41:25 +08:00
FEATURE: Optimize images before upload (#13432)
Integrates [mozJPEG](https://github.com/mozilla/mozjpeg) and [Resize](https://github.com/PistonDevelopers/resize) using WebAssembly to optimize user uploads in the composer on the client-side. NPM libraries are sourced from our [Squoosh fork](https://github.com/discourse/squoosh/tree/discourse), which was needed because we have an older asset pipeline.
This commit is contained in:

committed by
GitHub

parent
18de11f3a6
commit
fa4a462517
@ -112,6 +112,8 @@ def dependencies
|
||||
source: 'blueimp-file-upload/js/jquery.fileupload.js',
|
||||
}, {
|
||||
source: 'blueimp-file-upload/js/jquery.iframe-transport.js',
|
||||
}, {
|
||||
source: 'blueimp-file-upload/js/jquery.fileupload-process.js',
|
||||
}, {
|
||||
source: 'blueimp-file-upload/js/vendor/jquery.ui.widget.js',
|
||||
}, {
|
||||
@ -191,6 +193,30 @@ def dependencies
|
||||
{
|
||||
source: 'sinon/pkg/sinon.js'
|
||||
},
|
||||
{
|
||||
source: 'squoosh/codecs/mozjpeg/enc/mozjpeg_enc.js',
|
||||
destination: 'squoosh',
|
||||
public: true,
|
||||
skip_versioning: true
|
||||
},
|
||||
{
|
||||
source: 'squoosh/codecs/mozjpeg/enc/mozjpeg_enc.wasm',
|
||||
destination: 'squoosh',
|
||||
public: true,
|
||||
skip_versioning: true
|
||||
},
|
||||
{
|
||||
source: 'squoosh/codecs/resize/pkg/squoosh_resize.js',
|
||||
destination: 'squoosh',
|
||||
public: true,
|
||||
skip_versioning: true
|
||||
},
|
||||
{
|
||||
source: 'squoosh/codecs/resize/pkg/squoosh_resize_bg.wasm',
|
||||
destination: 'squoosh',
|
||||
public: true,
|
||||
skip_versioning: true
|
||||
},
|
||||
|
||||
]
|
||||
end
|
||||
|
Reference in New Issue
Block a user