Improve JPG Quality in Imagecache and ImageAPI

2nd June 2010

Warning: This post is over a year old. I don't always update old posts with new information, so some of this information may be out of date.

Whilst uploading images for my Projects and Testimonials sections, I noticed that the Imagecache-scaled images weren't as high a quality the originals on my Mac. I did some searching online and found out that, by default, Drupal resamples uploaded jpgs to 75% of their original quality.

To increase the quality of your images, change the setting in the two following places:

  • admin/settings/imageapi/config
  • admin/settings/image-toolkit

The first one is for ImageAPI. Primarily, this means Imagecache presets. The second one is for core's image.inc. This is used for resizing profile pictures in core, and some contrib modules. Once changed, I did have to flush each of the Imagecache presets (admin/build/imagecache) for the changes to take effect.

Questions? Comments? I’m @opdavies on Twitter.

Tags: drupal-6, drupal-planet, imagecache

About the Author

Picture of Oliver

Oliver Davies is a full-stack Web Developer and System Administrator based in the UK. He is a Senior Developer at Microserve and a part-time freelancer specialising in Drupal, Symfony and Laravel development and Linux systems administration.