SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Sep 2010
    0 Post(s)
    0 Thread(s)

    GD library - reduce quality/filesize

    I have a script that sizes images and makes a thumbnail. It works well but often if a user adds a large image, the resized image is the correct physical size but the file-size is too big and could make the page load slowly.
    Is there anyway that I can reduce the quality/resolution of the image to make it fit below a set filesize, or jus set the overall quality to 60% or something like that?

  2. #2
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Cambridge, England
    80 Post(s)
    3 Thread(s)
    I Do not belive you can easily decide on a final image size or percent wothout resizing the image getting the image size and if it is still to big resize again.

    The only way is set the image quality in the save command; see: imagejpeg


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts