InMotion Hosting Support Center

Why can't ImageMagick be run from a script?

Category: Image Editing

2013-01-24 4:12 pm EST

Hits: 632
I am on a shared server, and would like to use ImageMagick to convert an SVG file to a jpeg image, but I have found that I can't run ImageMagick from within a PHP script. According to this page, it can only be run from the command line, or, on a shared server by using exec() or a cron job:

1) Why aren't the API's installed?
2) Is it possible to install them? Or is using exec() or a cron job really my only option?

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by User


40,993 Points
2013-01-24 4:53 pm EST
Hello Jdgrimes,

The API's for Imagemagick ARE installed- as per the article you listed, Imagemagick is MOGRIFY and CONVERT. That article gives you the commands that you need to use. I had a systems person check and it definitely supports the conversion of SVG files. He asked that I warn you however that using the CONVERT command on the server can consume high resources depending on the number of images that you are converting. He suggested that you convert your images locally and then put them on the server to avoid possible issues. Running this for a large number of images on a shared server is not recommended.

If you have any further questions, please contact technical support or leave a comment at the bottom of the page.


Arnel C.

You must login before you can post a comment about this answer.

Like this Question?

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Need more Help?


Ask the Community!

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

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!