Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the image quality during upload, even if the image is not going to be resized #1746

Closed
ToX82 opened this issue Nov 14, 2016 · 2 comments
Assignees
Labels

Comments

@ToX82
Copy link

ToX82 commented Nov 14, 2016

I am using the AutoResize plugin and it does its job perfectly.

Anyway, sometimes I need to upload images that area already smaller than the AutoResize maxWidth/maxHeight options, and I want their quality to be set to 85. Since the uploaded images are already small, the AutoResize plugin is not triggered and the original quality is preserved.

Would it be feasible to have AutoResize to optimize image quality to all the images, regardless if they are going to be resized or not?

@nao-pon nao-pon self-assigned this Nov 16, 2016
@nao-pon
Copy link
Member

nao-pon commented Nov 16, 2016

@ToX82 I added plugin option 'forceEffect. Please set it to true.

'plugin' => array(
    'AutoResize' => array(
        'enable'         => true,       // For control by volume driver
        'maxWidth'       => 1024,       // Path to Water mark image
        'maxHeight'      => 1024,       // Margin right pixel
        'quality'        => 95,         // JPEG image save quality
        'preserveExif'   => false,      // Preserve EXIF data (Imagick only)
        'forceEffect'    => true,       // For change quality of small images
        'targetType'     => IMG_GIF|IMG_JPG|IMG_PNG|IMG_WBMP // Target image formats ( bit-field )
    )
)

Thanks! 👍

@ToX82
Copy link
Author

ToX82 commented Nov 16, 2016

Wow so fast, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants