WordPress Customer needs to upload images > 2 MB

Boy, we’re on a roll here at Lizardwebs…

So a WordPress customer contacted me yesterday about not being able to upload some images for a new post on her WordPress website.  I knew it was only a matter of time before I had someone ping me about this image size issue.

On my VPS servers, it’s an easy thing to do – modify the php.ini – BUT what if you don’t have access to the php.ini file – as with my Rackspace Cloud site setup?  Like many other things – modify the .htaccess file.

However, there is a secondary issue – server storage space.  If I *do* let them upload these huge images, I’ll end up either losing a lot of space with these huge images that won’t look good using the Lightbox display method that I prefer or ending up having to bill them for extra space usage. If I were less scrupulous, I’d jam the billing direction, but I’m not, so here is the solution that we can ALL live with…

Allow image uploads larger than 2 MB

Modify the .htaccess file to include this line, and while you’re at it, I would also add the second line if you’re using WordPress…

php_value upload_max_filesize 5M
php_value memory_limit 64M

The first line will allow you to upload up to a 5 MB file image to a WordPress website. The second line will boost the PHP memory limit to 64 MB – my WordPress stuff occasionally tanks at 32 MB depending on the actual site and gives the dreaded “White Screen of Death” as I’ve posted on elsewhere…

Great, so now you’re allowing them to upload huge images in WordPress and they’ll fill up that server space VERY quickly – particularly if they have a 50 or 100 MB server storage space limit.

Since our customers usually don’t have much experience with the whole resizing image thing, we need to do it automatically for them… Not only do we want to resize the image for WordPress, but we would ALSO like to get rid of that huge image file..

Resize the image properly AND automatically

Imsanity image resizing plugin does the job seamlessly and without any user intervention. I was afraid when I saw it that it would require an extra step or two that I would need to alert my clients to, but it doesn’t!  It checks the image and shrinks it on down. I set mine to go no larger than 800×600 to be fairly reasonable on ANY screen – and it does it automatically without any extra steps involved.

I manually resized some images with Photoshop and the size was still a bit smaller. The original was a 1.1 MB JPG. With Photoshop “Save for Web”, I ended up at 164 KB for an 800×600 @ 72 ppi. With Imsanity, the resulting image was 188 KB – NOT bad in the big scheme of things.  So if you ARE a web designer/developer or graphics person, it is still more efficient to do it yourself as far as space savings – and likely the quality of a Photoshop resize is a little better. For an end user though, that doesn’t have access to decent graphics programs or just can’t seem to get it right, the Imsanity WordPress image resize plugin is THE bomb.

Author: Eric Erickson

Share This Post On

Submit a Comment

Your email address will not be published. Required fields are marked *