Does this require the GD toolkit or ImageMagick?

Created on 13 July 2023, over 1 year ago

I suppose it's obvious in the name of this GD submodule, but I'm trying to figure out if this will work with the ImageMagick toolkit?

I'm trying to create image actions like crop/scale/focus and wondering if I would be able to do that with this module even if I'm using ImageMagick as the toolkit?

I'm hosting with Acquia and already have the ImageMagick binary installed on my server. I'm following this article https://dev.acquia.com/tutorial/image-optimization-acquia-cloud, which mentions using ImageMagick instead of GD.

These are the steps I'm planning to do:

  • Install ImageMagick library instead of the default GD library because it's installed an Acquia and doesn't use up Apache PHP memory
  • Install Image API Optimize
  • Install Image API Optimize Binaries
  • Install Image API Optimize Webp module to automatically apply WEBP optimization to images that are rendered via the image styles we created above.
  • You should place the WebP processor before any other compression processors to avoid duplicate compression of an image. This can have an inverse affect and provide a lower quality image at a larger file size.
  • You are encouraged to set your sitewide GD (or ImageMagick) toolkit quality to 100, and allow ImageAPI Optimize to handle compression/optimization. This is again to avoid duplicate compression of images. We've created another module: ImageAPI Optimize GD to allow for standard image quality reductions in your pipelines, however checkout ImageAPI Optimize for a full list of processors.
  • We should define scale, focus, and crop actions for each image style, but I'm finding things about ImageMagick not being able to support cropping... These things work out of the box with ImageAPI Optimize GD because it is using PHP memory, but it's possibly slower and more resource intensive.
  • https://www.drupal.org/project/image_effects/issues/3023439
  • https://www.drupal.org/project/smartcrop/issues/1393002
  • At /admin/config/media/imageapi-optimize-pipelines of your site create a new pipeline, and add the "Webp", "PngCrush", and "JpegTran" processors. Make sure Webp is first.
  • https://www.drupal.org/docs/contributed-modules/image-optimize/site-buil...
  • Set your pipeline as the sitewide default or for a particular image style.
  • Skip the step in the Acquia article about "Add WebP Support" that uses the https://www.drupal.org/project/webp module instead of the https://www.drupal.org/project/imageapi_optimize_webp as mentioned above.
  • Note: There is some overlap with this module and the WebP module. The difference being this module is intended to only support projects using ImageAPI Optimize. Because of the overlap between these modules(and the need to override the same route), both modules cannot work in tandem for the time being.
💬 Support request
Status

Active

Version

2.0

Component

Documentation

Created by

🇺🇸United States wesleymusgrove

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024