{"id":3198,"date":"2020-03-06T10:00:00","date_gmt":"2020-03-06T15:00:00","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2014\/04\/10\/using-imagemagick\/"},"modified":"2024-04-17T12:24:36","modified_gmt":"2024-04-17T16:24:36","slug":"using-imagemagick","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/","title":{"rendered":"How to use ImageMagick"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick-1024x538.png\" alt=\"How to use ImageMagick Hero Image\" class=\"wp-image-105481\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick-1024x538.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick-300x158.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick-768x403.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick.png 1200w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>You may or may not know, but to manipulate images in WordPress, you must have an image optimization library in the PHP application. In fact, without it, WordPress will not even be able to produce thumbnails images. Instead, your images will display full-sized in areas where a thumbnail would be better.\u00a0<\/p>\n\n\n\n<p>There are two popular image optimization libraries: ImageMagick and GD. Though both perform similar actions, ImageMagick rises above for WordPress use. This article will explain why ImageMagick is great for WordPress, how to find and use ImageMagick, and give examples of ImageMagick in action. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#Why-is-ImageMagick-Great-for-WordPress\">Why is ImageMagick Great for WordPress?<\/a><\/li>\n\n\n\n<li><a href=\"#Accessing-ImageMagick\">Accessing ImageMagick<\/a><\/li>\n\n\n\n<li><a href=\"#Using-ImageMagick\">Using ImageMagick<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#Using-Convert\">Convert<\/a><\/li>\n\n\n\n<li><a href=\"#Using-Mogrify\">Mogrify<\/a><\/li>\n\n\n\n<li><a href=\"#Understanding-Image-Aspect-Ratio\">Image Aspect Ratio<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#Additional-Information-on-ImageMagick\">Additional Info on ImageMagick <\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"alert alert-info\"><span style=\"font-weight: 400;\">As of February 25, 2020, the servers for <a aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.inmotionhosting.com\/wordpress-hosting\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress Hosting<\/a> customers have the PHP extensions that allows the use of imagick from PHP code. <\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Why-is-ImageMagick-Great-for-WordPress\"><strong>Why is ImageMagick Great for WordPress?<\/strong><\/h2>\n\n\n\n<p>ImageMagick is a software suite that can be used to manipulate images. As mentioned above, GD and ImageMagick complete similar tasks, however, ImageMagick produces sharper, higher-quality compressed images.\u00a0 In addition, it\u2019s dependable, supports many image formats (some lesser-used formats like TIFF, RAW), and can facilitate more tasks easily. To use ImageMagick with InMotion Hosting servers, you will need to use PHP or execute a command in <a href=\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/how-to-login-ssh\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">SSH<\/a>.  <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Accessing-ImageMagick\">Accessing ImageMagick<\/h2>\n\n\n\n<p>By default, ImageMagick is installed on InMotion Hosting servers. However, it can only be accessed through the command line, a <a href=\"\/support\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">cron job<\/a> or PHP code on a web page. The path for the command line options would look like this:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b><code>\/usr\/bin\/convert<\/code><\/b><\/li>\n\n\n\n<li><b><code>\/usr\/bin\/mogrify<\/code><\/b><\/li>\n<\/ul>\n\n\n\n<p>ImageMagick has many modules that can be loaded, but for the purposes of InMotion\u2019s hosting servers, the main commands available are <code>convert<\/code> and <code>mogrify<\/code>. These commands can be used through PHP using a native extension called <b>Imagick<\/b>. For more information, please see <i><a href=\"https:\/\/www.php.net\/manual\/en\/class.imagick.php\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">the Imagick class<\/a><\/i> in the PHP documentation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Using-ImageMagick\">Using ImageMagick<\/h2>\n\n\n\n<p>ImageMagick can be used through SSH and PHP. The following examples are executed in SSH. Each example uses the <code>convert<\/code> command. By default, the <code>convert<\/code> command maintains the <a href=\"#Understanding-Image-Aspect-Ratio\">aspect ratio<\/a> of the image by.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Using-Convert\">Using Convert<\/h3>\n\n\n\n<div class=\"alert alert-warning\">\n<p>When you use the commands below, the apect ratio of the image is not changed. This means that if you convert an image that is originally 320\u00d7220 pixels to 64 x 64 pixels (as per the examples below), the actual size will be 64 x 44 pixels, because it shrinks to the smallest dimension while maintaining the aspect ratio. For more information, please see <a href=\"#Understanding-Image-Aspect-Ratio\">aspect ratio<\/a> below.<\/p>\n<\/div>\n\n\n\n<p><strong>VPS and Dedicated servers with SSH access<\/strong><\/p>\n\n\n\n<div class=\"code_block\">convert larger-image.png -resize 64\u00d764 smaller-image.png<\/div>\n\n\n\n<p><strong>Cron job command for shared servers with no SSH access<\/strong><\/p>\n\n\n\n<div class=\"code_block\">\/usr\/bin\/convert public_html\/larger-image.png -resize 64\u00d764 public_html\/smaller-image.png<\/div>\n\n\n\n<p><strong>PHP command for shared servers with no SSH access<\/strong><\/p>\n\n\n\n<div class=\"code_block\">exec(\u2018\/usr\/bin\/convert \/home\/USERNAME\/public_html\/larger-image.png -resize 64\u00d764 \/home\/USERNAME\/public_html\/smaller_image.jpg\u2019);<\/div>\n\n\n\n<div class=\"alert alert-info\">\n<p><i>You will need to replace <b>USERNAME<\/b> with the actual username of the account. You also need to make sure that the folder where the converted image is being saved has the proper <a href=\"\/support\/edu\/cpanel\/change-file-permissions\/\">write permissions<\/a>.<\/i><\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Using-Mogrify\">Using Mogrify<\/h3>\n\n\n\n<p>The <code>mogrify<\/code> command can be used in place of <code>convert<\/code> to resize an image with the main difference being that it modifies the <i>original<\/i> file. Like <code>convert<\/code>, the mogrify command maintains the <a href=\"#Understanding-Image-Aspect-Ratio\">aspect ratio<\/a> of the image by default.  Want to learn more? Read <a rel=\"noreferrer noopener\" aria-label=\"additional documentation (opens in a new tab)\" href=\"https:\/\/www.imagemagick.org\/script\/mogrify.php\" target=\"_blank\">additional documentation<\/a> on <code>mogrify<\/code>.  <\/p>\n\n\n\n<p><strong>VPS and Dedicated servers with SSH access<\/strong><\/p>\n\n\n\n<div class=\"code_block\">mogrify -resize 64\u00d764 original-image.png<\/div>\n\n\n\n<p><strong>Cron job for shared servers with no SSH access<\/strong><\/p>\n\n\n\n<div class=\"code_block\">\/usr\/bin\/mogrify -resize 64\u00d764 public_html\/orignal-image.png<\/div>\n\n\n\n<p><strong>PHP script command for shared servers with no SSH access<\/strong><\/p>\n\n\n\n<div class=\"code_block\">exec(\u2018\/usr\/bin\/mogrify -resize 64\u00d764\u2019 \/home\/USERNAME\/public_html\/original-image.png );<\/div>\n\n\n\n<div class=\"alert alert-info\">\n<p><i>You will need to replace <b>USERNAME<\/b> with the actual username of the account. You will also need to make sure that the folder where the converted image is being saved has the proper <a href=\"\/support\/edu\/cpanel\/change-file-permissions\/\">write permissions<\/a>.<\/i><\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Understanding-Image-Aspect-Ratio\">Understanding Image Aspect Ratio<\/h3>\n\n\n\n<p>The simplest way to understand aspect ratio is to imagine taking an image and shrinking it down without causing any distortion. For example, the commands above use a square image of 64 x 64 pixels. If it was resized to 32 x 32 pixels, its aspect ratio will be maintained and will not show any distortion. However, if it was resized to 32 x 20 pixels, then the image is no longer square and the aspect ratio would be different causing distortion. You can see the differences in the cat images below. Using the above <code>convert<\/code> or <code>mogrify<\/code> commands will change the size of the image while automatically maintaining the aspect ratio. If you wish to force a change in aspect ratio, then the main difference in the command will be to add an \u201c!\u201d after the declared size for the image.  <\/p>\n\n\n\n<div class=\"code_block\">convert original-image.png -resize 64\u00d764\/! smaller-image.png<\/div>\n\n\n\n<div class=\"code_block\">mogrify -resize 64\u00d764\/! original-image.png<\/div>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><th>Original Image<\/th><th>Aspect ratio maintained<\/th><th>Aspect ratio changed<\/th><\/tr><tr><td><figure><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"532\" class=\"size-full wp-image-13446 size-full wp-image-13447 size-full wp-image-13448\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/04\/edu_imagemagick_grayson1.jpg\" alt=\"Original Cat Image\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/04\/edu_imagemagick_grayson1.jpg 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/04\/edu_imagemagick_grayson1-169x300.jpg 169w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure><\/td><td><figure><img decoding=\"async\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/04\/edu_imagemagick_grayson150.jpg\" alt=\"Aspect ratio maintained\"><\/figure><\/td><td><figure><img decoding=\"async\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/04\/edu_imagemagick_grayson150150.jpg\" alt=\"Aspect ratio changed\"><\/figure><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Additional-Information-on-ImageMagick\">Additional Information on ImageMagick<\/h2>\n\n\n\n<p>ImageMagick is a complex suite of tools that allow you to create and modify images in different formats. The information above is merely a snapshot of its vast capabilities. The options available on InMotion\u2019s Shared servers primarily involve the <code>convert<\/code> and <code>mogrify<\/code> commands, but there are many other modules and processing options that you can load if you are using ImageMagick on a <a href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\">VPS<\/a> or <a href=\"https:\/\/www.inmotionhosting.com\/dedicated-servers\">Dedicated server<\/a>.<\/p>\n\n\n\n<p><br>Of note, when using ImageMagick,\u00a0 processing many images at once can severely affect the resources of your server. For more information on server resources, please see <a href=\"https:\/\/www.inmotionhosting.com\/support\/server\/server-usage\/excessive-cpu-processing-especially-image-manipulation\/\">excessive CPU processing<\/a>. If you want to process a lot of images in bulk, do them in several groups and during off-peak hours. Ask our <a href=\"https:\/\/www.inmotionhosting.com\/support\/questions\/\">Community Support<\/a> or 24\/7 <a href=\"https:\/\/www.inmotionhosting.com\/support\/amp\/how-to-get-great-technical-support\/\">technical support team<\/a> if you require further information. You can also visit the<a href=\"https:\/\/www.imagemagick.org\/\"> ImageMagick.org<\/a> for additional tutorials and documentation. <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may or may not know, but to manipulate images in WordPress, you must have an image optimization library in the PHP application. In fact, without it, WordPress will not even be able to produce thumbnails images. Instead, your images will display full-sized in areas where a thumbnail would be better.\u00a0 There are two popular<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57014,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4360],"tags":[],"class_list":["post-3198","post","type-post","status-publish","format-standard","hentry","category-software"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to use ImageMagick | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Learn how to change image sizes using ImageMagick resize and mogrify commands in SSH, a cron job, or PHP script.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use ImageMagick | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Learn how to change image sizes using ImageMagick resize and mogrify commands in SSH, a cron job, or PHP script.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-06T15:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-17T16:24:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick-1024x538.png\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"How to use ImageMagick\",\"datePublished\":\"2020-03-06T15:00:00+00:00\",\"dateModified\":\"2024-04-17T16:24:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/\"},\"wordCount\":939,\"commentCount\":13,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick-1024x538.png\",\"articleSection\":[\"Software\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/\",\"name\":\"How to use ImageMagick | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick-1024x538.png\",\"datePublished\":\"2020-03-06T15:00:00+00:00\",\"dateModified\":\"2024-04-17T16:24:36+00:00\",\"description\":\"Learn how to change image sizes using ImageMagick resize and mogrify commands in SSH, a cron job, or PHP script.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick.png\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick.png\",\"width\":1200,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use ImageMagick\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use ImageMagick | InMotion Hosting","description":"Learn how to change image sizes using ImageMagick resize and mogrify commands in SSH, a cron job, or PHP script.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/","og_locale":"en_US","og_type":"article","og_title":"How to use ImageMagick | InMotion Hosting","og_description":"Learn how to change image sizes using ImageMagick resize and mogrify commands in SSH, a cron job, or PHP script.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2020-03-06T15:00:00+00:00","article_modified_time":"2024-04-17T16:24:36+00:00","og_image":[{"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick-1024x538.png","type":"","width":"","height":""}],"author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"How to use ImageMagick","datePublished":"2020-03-06T15:00:00+00:00","dateModified":"2024-04-17T16:24:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/"},"wordCount":939,"commentCount":13,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick-1024x538.png","articleSection":["Software"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/","name":"How to use ImageMagick | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick-1024x538.png","datePublished":"2020-03-06T15:00:00+00:00","dateModified":"2024-04-17T16:24:36+00:00","description":"Learn how to change image sizes using ImageMagick resize and mogrify commands in SSH, a cron job, or PHP script.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/07\/How-to-use-ImageMagick.png","width":1200,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/using-imagemagick\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to use ImageMagick"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4360,"name":"Software","slug":"software","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57014"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=3198"}],"version-history":[{"count":10,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3198\/revisions"}],"predecessor-version":[{"id":127578,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3198\/revisions\/127578"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=3198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=3198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=3198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}