---
title: "Image Optimization on Acquia Cloud"
date: "2022-06-08T19:17:37+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/88966-image-optimization-acquia-cloud"
id: "edcd387d-c5dd-462c-af23-2557426ebf37"
---

Table of contents will be added

Goal
----

Implement image optimization best practices so your site can serve images at the smallest possible file size

Overview
--------

[Optimization of images](/acquia-cloud-platform/help/89221-image-optimization-crucial-performance-step "Image Optimization: A Crucial Performance Step") on your website is crucial for performance, user experience, SEO, and success of your site. Cloud Platform has built-in capabilities to help your site serve great-looking images that load quickly.

The following are the steps needed to put these capabilities to use:

1.  Use the Built-in Utilities
    --------------------------
    
    Among the supported software that you can use on Acquia Cloud are ready-to-use versions of PngCrush and JpegTran. Acquia [recommends](/acquia-cloud-platform/help/92661-scoping-impact-image-processing "Scoping the impact of image processing") that you use the installed [ImageMagick](http://www.imagemagick.org/) library instead of the Drupal default GD library, which is installed by default in most LAMP stacks. The main benefit of Imagemagick is that unlike GD, it doesn’t use Apache’s processes, and puts a lower demand on server resources. To make this change, install the [ImageMagick module](https://www.drupal.org/project/imagemagick) and then update the setting at /admin/config/media/image-toolkit in your site to use it:
    
    ![Screenshot of a web page displaying image processing toolkit settings, including options for ImageMagick and GD2, with image quality set to 75.](https://acquia.widen.net/content/2015bb22-edfb-460f-ad73-2aa698501c38/web/url_a504badbb8f493264e68c03a51576c8f.webp)
    
2.  Set Up Image Optimize
    ---------------------
    
    To optimize your images with the locally available versions of PngCrush and JpegTran, install the [Image Optimize](https://www.drupal.org/project/imageapi_optimize) and [Image Optimize Binaries](https://www.drupal.org/project/imageapi_optimize_binaries) modules. At /admin/config/media/imageapi-optimize-pipelines of your site create a new pipeline, and add the PngCrush and JpegTran processors:
    
    ![Screenshot of a web interface for editing an image optimization pipeline named "PngCrush + JpegTran" with options to edit or delete processors.](https://acquia.widen.net/content/53ea08f7-6ed0-4e2f-bb7a-dc739d3bfbcd/web/url_10238c07acaa2d351911e3c52868702a.webp)
    
3.  Configure JpegTran
    ------------------
    
    Note that for JpegTran, it’s recommended to force the creation of jpeg files as progressive, which can be done with a simple checkbox:
    
    ![Web interface showing "Add JpegTran processor" with status message, executable path, and options to add or cancel the processor.](https://acquia.widen.net/content/ee0fac0b-9081-4a86-89c8-40154a3b7932/web/url_ad482f365bb7c18bde4551e56aa3369a.webp)
    
4.  Set Your Pipeline As Default
    ----------------------------
    
    After you’re done, set your new pipeline as the sitewide default if you want to use it everywhere, otherwise you can manually choose a specific pipeline in the settings for any image style.
    
5.  Add WebP Support
    ----------------
    
    You can also allow this pipeline to create processed images as webp with a jpeg format by adding the WebP processor. Note that this will only apply as part of responsive images, where a tag will be created to provide the webp images. To implement that here, install the [WebP module](https://www.drupal.org/project/webp), and add and configure the processor to your Image Optimize pipeline:
    
    ![Web interface for adding a WebP processor with options to adjust image quality, save changes, or cancel.](https://acquia.widen.net/content/fa7f18c4-8b9c-4c35-a804-5eaf13ba21cf/web/url_d26c8358ae91d50784021908395eeadf.webp)
    
    In particular you’ll likely want to set the image quality lower than the default of 100.
    
6.  Profit!
    -------
    
    By following the steps above, Drupal is now able to generate a variety of image variants to provide an optimized experience for visitors across a variety of browsers and screen sizes, all from a single uploaded image:
    
    ![HTML code snippet showing multiple image source URLs and sizes with alt text: "Open terraces in a modern office building."](https://acquia.widen.net/content/b618aad4-9a97-4f7a-9a17-ad7957bf89b0/web/url_a4de46e492523c0871cc26863fdf3e63.webp)
    

Additional Resources
--------------------

*   [Scoping the impact of image processing](/acquia-cloud-platform/help/92661-scoping-impact-image-processing "Scoping the impact of image processing")
*   [Improving site performance with WebP images on Acquia Cloud](/acquia-cloud-platform/help/94381-how-enable-support-webp-images-acquia-cloud "How to enable support for WebP images on Acquia Cloud")
*   [How to leverage WebP images for faster loading of a Site Studio site](/drupal-starter-kits/add-ons/site-studio/help/92296-how-leverage-webp-images-faster-loading-site-studio-site "How to leverage WebP images for faster loading of a Site Studio site")