Skip to content

Upgrading mini_magick 4 to 5

Breaking4.13.2 → 5.4.0Breaking12Platform1Deprecated1New5Changed8Fixed9

BreakingUpgrade verdict

12 breaking changes and a platform requirement change.

  • GraphicsMagick is no longer officially supported. You can still use it by setting cli_prefix to "gm", but some features will not work.
  • Two configuration options for choosing the command line tool and processor are gone.
  • The old posix-spawn option for running commands is removed, along with its configuration setting.
  • The run_command method on images no longer exists.
Top 5 of 14 that need code or config changes

Ruby requirement changed in 5.3.0: >= 2.3 → >= 2.5.

Breaking12
Removes official GraphicsMagick support; it can be used by setting cli_prefix, with some features unsupported.
cli_prefixMiniMagick.timeoutImage#dataImage#exif
Removes MiniMagick.cli and MiniMagick.processor configuration as a result of dropping GraphicsMagick support.
MiniMagick.cliMiniMagick.processor
Removes the deprecated posix-spawn shell backend and the MiniMagick.shell_api configuration.
posix-spawnMiniMagick.shell_api
Removes the obsolete Image#run_command method.
Image#run_command
Removes deprecated Image#mime_type; use Marcel, MimeMagic, mime-types or MiniMime with Image#type instead.
Image#mime_typeImage#type
Renames the MiniMagick.whiny configuration to MiniMagick.errors.
MiniMagick.whinyMiniMagick.errors
Removes deprecated Image#details in favor of the more reliable Image#data.
Image#detailsImage#data
Removes Image#respond_to_missing?, so Image#respond_to? returns false for ImageMagick option methods; also removes MiniMagick::Tool.option_methods and MiniMagick.reload_tools.
Image#respond_to_missing?Image#respond_to?MiniMagick::Tool.option_methodsMiniMagick.reload_tools
Removes the obsolete MiniMagick.processor_path configuration, mostly an alias for MiniMagick.cli_path.
MiniMagick.processor_pathMiniMagick.cli_path
Removes deprecated MiniMagick.debug in favor of MiniMagick.logger.level = Logger::DEBUG.
MiniMagick.debugMiniMagick.logger.levelLogger::DEBUG
Removes the unused MiniMagick.validate_on_write configuration.
MiniMagick.validate_on_write
Additional Pathname#open or URI#open options for Image.open must now be passed as keyword arguments instead of a hash.
Image.openPathname#openURI#open
Platform1
Actually requires Ruby 2.5+ in the gemspec.
Deprecated1
Deprecates the MiniMagick::Tool::* classes in favor of the class-level interface.
MiniMagick::Tool::*