ImageMagick allows you to dynamically create and edit images on the server.  ImageMagick is usually run from the command line, but since command line access is not available on Web Hosting Hub servers, the commands can be ran through cron jobs or PHP scripts instead. ImageMagick programs are located in:

  • /usr/bin/convert
  • /usr/bin/mogrify

Using ImageMagick

For more information on using ImageMagick, please see the ImageMagick documentation:


The following are examples to demonstrate that ImageMagick is installed and functioning. If you have a file named image.jpg in your public_html, the following commands ran through either a cron job or from a PHP script will resize the image and name the new image to resize_image.jpg.

Running ImageMagick from a cron job

Set up a cron job with the following command:

/usr/bin/convert public_html/image.jpg -resize 64x64 public_html/resize_image.jpg

Running ImageMagick from a PHP script

Run the following command from a php script: 

exec('/usr/bin/convert /home/USERNAME/public_html/image.jpg -resize 64x64 /home/USERNAME/public_html/resize_image.jpg');

Replace USERNAME with your actual cPanel username (e.g. userna5) and make sure that the folder you are writing the image to has file permissions set to 755.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Did you find this article helpful?

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.