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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.