public function jpegQualitySetting($quality)
    {
        // Work on quality
        $q = is_bool($quality) && $quality ? 72 : (integer) $quality;
        $q = 0 < $q && $q <= 100 ? $q : 72;

        // Apply filter hook
        add_filter('jpeg_quality', function () use ($q) {
            return $q;
        });
    }
public function jpegQualitySetting($quality)
    {
        // Work on quality
        $q = is_bool($quality) && $quality ? 72 : (integer) $quality;
        $q = 0 < $q && $q <= 100 ? $q : 72;

        // Apply filter hook
        add_filter('jpeg_quality', function () use ($q) {
            return $q;
        });
    }
public function jpegQualitySetting ( $ quality ) { // Work on quality $ q = is_bool ( $ quality ) && $ quality ? 72 : ( integer ) $ quality ; $ q = 0 < $ q && $ q <= 100 ? $ q : 72 ; // Apply filter hook add_filter ( 'jpeg_quality' , function ( ) use ( $ q ) { return $ q ; } ) ; }
Update JPEG quality of generated images.

@param integer $quality
Update JPEG quality of generated images .