Skip to content

Instantly share code, notes, and snippets.

@markhowellsmead
Last active December 24, 2021 14:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markhowellsmead/4dc7727e823fe83aa492 to your computer and use it in GitHub Desktop.
Save markhowellsmead/4dc7727e823fe83aa492 to your computer and use it in GitHub Desktop.
Plugin to force WordPress to use ImageMagick instead of GDlib when resizing images
<?php
/**
* Plugin Name: Force Imagick
* Description: Stops GD image library from being used by default. Allows EXIF data to be retained, amongst other things.
* Author: https://wordpress.org/support/profile/bcworkz
* License: GPL2
*/
add_filter('wp_image_editors', 'fi_force_imagick');
function fi_force_imagick() {
return array('WP_Image_Editor_Imagick');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment