Jump to content

Uploading Images and Manipulation using ImageMagick - Best Practices


mds1256

Recommended Posts

Hi

 

Just after some advice on using ImageMagick for reducing images that are uploaded.

 

First of all I will have a form so users can upload Photos ideally these will be in TIFF, JPG / JPEG or BMP.

 

The Form will then process these images to reduce the size / compress and make a thumbnail as well as a normal version.

 

Hosting will be on a Debian VPS.

 

I would like to know if there are any things to look out for, I have thought of a few:

 

  • Make sure this is an image that is uploaded (what is the best way to check, I have read get the image size?)
  • upload to TMP folder then use imagemagick to process and save to a final destination which is outside of the web root?
  • change permissions on that folder as well as TMP to remove eXecute
  • use a .htaccess file to prevent any scripts from running from there AND the TMP folder

Any thing else I should do?

 

Also a question around ImageMagick, i hear this is better than GD at resource management (if server starts running out of RAM it pages to disk so it won't fail), is this true?

 

Thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.