WordPress.org

Ready to get started?Download WordPress

Forums

Auto Image Resizer
Set a better compression (6 posts)

  1. cfs5403
    Member
    Posted 3 years ago #

    This plugin can resize image but quality seem so bad, anyone know how to set a better quality compression? Please help me with the code, which part should I modified it?

    [Code moderated as per the Forum Rules. Please use the pastebin]

    http://wordpress.org/extend/plugins/auto-image-resizer/

  2. Dennis Hoppe
    Member
    Plugin Author

    Posted 3 years ago #

    I will add this as a new to the backend in the new version. To change the quality you need to add the third parameter to imagejpeg() and imagepng(). For imagejpeg() you need to set a value ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file) and for imagepng() a value from 0 (no compression) to 9.

  3. cfs5403
    Member
    Posted 3 years ago #

    sorry, I am newbie, I don't understand which line you said.

  4. Dennis Hoppe
    Member
    Plugin Author

    Posted 3 years ago #

    The line where imagejpeg() and imagepng() were called... ;)

  5. jeey
    Member
    Posted 3 years ago #

    Hi

    Mind detailing this a bit more?

    Case IMAGETYPE_JPEG: imagejpeg($image_resized, $dst, 75); Break;

    Like this?

  6. Dennis Hoppe
    Member
    Plugin Author

    Posted 3 years ago #

    Exactly. But 75 is the default value. ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic