1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Editing ImageProxy.php to include jpegoptim compression

Discussion in 'XenForo Development Discussions' started by Amin Sabet, Oct 13, 2015.

  1. Amin Sabet

    Amin Sabet Well-Known Member

    I'm trying to find a way to have the Image Proxy compress jpeg images using jpegoptim server-side, before caching them.

    This is the file it seems that I need to edit:


    The compression I want to use is jpegoptim --max=90

    Path to jpegoptim is /usr/bin/jpegoptim

    Can anyone give me some pointers how to make the necessary edit?
  2. batpool52!

    batpool52! Well-Known Member

    You can use load_class_model to extend the function to make use of your value.
    Amin Sabet likes this.

Share This Page