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:
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.
Set up a cron job with the following command:
/usr/bin/convert public_html/image.jpg -resize 64x64 public_html/resize_image.jpg
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.
Email: | support@WebHostingHub.com | Ticket: | Submit a Support Ticket |
---|---|---|---|
Call: |
877-595-4HUB (4482) 757-416-6627 (Intl.) |
Chat: | Click To Chat Now |
We value your feedback!
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.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!