Code Monkey home page Code Monkey logo

lscache_wp's People

Contributors

beshoyatef avatar blastoise186 avatar bornforlamp avatar halilemreozen avatar hi-hai avatar j-rey avatar jmca2 avatar joejordanbrown avatar kokers avatar litespeedtech avatar lslisa avatar lsmike avatar lucasrolff avatar m-zou avatar netzlichter avatar qtwrk avatar ruzgfpegk avatar spenweb avatar steverep avatar therealgilles avatar wllcrre avatar woet avatar

Watchers

 avatar

lscache_wp's Issues

Add support for local image optimization

From the official website:

We use a combination of several libraries to adjust your images to 85%-90% quality of the original.

During the process, three versions of each image file are generated:

 * yourimage.bk.jpg: the original version of your image.
 * yourimage.jpg: the optimized version of your image, which is what will be shown on your site from now on.
 * yourimage.jpg.webp: is a version of your image saved in a format that is about 25%-34% smaller than jpg (learn more). To automatically serve WebP images to browsers that support them, just set LiteSpeed Cache > Settings > Media > Image WebP Replacement to ON.

How LSCache Optimizes so Effectively

LSCache image optimization uses far more than just these popular libraries: PNGQuant, JPEGOptim and OptiPNG. We take the best of the libraries we use, in order to get the best compression.

This could at least partially be done locally on systems with the relevant binaries already installed (...or compiled) and with the PHP exec command allowed.

Everyone cannot use the current method (sending images to a remote server) due to privacy concerns, internal environments, ...

The easiest tool to use would be cwebp for WebM conversions, with possibly various passes to determine the best one (depending on the image type, a lossless version can be smaller than a compressed one, and the image type preset could help squeeze even more bytes).

As for JPEGs, the best solution would be to use MozJPEG but it should be compiled on most systems beforehand.

Alternatively, libjpeg-turbo (upon which MozJPEG is built) could also be used.

As for Guetzli... yeah, no.

For now I have to understand the plugin's way of doing things before going further, and I don't know if/when I'll be able to do that, but if somebody is interested we can collaborate to do this and make a PR to upstream (they may not want it though).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.